diff --git a/test/test_addition.c b/test/test_addition.c index 02db089..6177f55 100644 --- a/test/test_addition.c +++ b/test/test_addition.c @@ -97,4 +97,22 @@ void test_addition_addition_basecaseonescolumns(void) TEST_ASSERT_EQUAL_INT(expected[1], result[1]); } +void test_addition_addition_basecasetotenscolumns(void) +{ + int result[5]; + int expected[5] = { 3, 3, 2, 3, 3 }; + + result[0] = addition(0, 3); + result[1] = addition(1, 2); + result[2] = addition(1, 1); + result[3] = addition(2, 1); + result[4] = addition(3, 0); + + TEST_ASSERT_EQUAL_INT(expected[0], result[0]); + TEST_ASSERT_EQUAL_INT(expected[1], result[1]); + TEST_ASSERT_EQUAL_INT(expected[2], result[2]); + TEST_ASSERT_EQUAL_INT(expected[3], result[3]); + TEST_ASSERT_EQUAL_INT(expected[4], result[4]); +} + #endif // TEST