From fe1129bef6be2bfc1cd46be193ec428e6c4d9742 Mon Sep 17 00:00:00 2001 From: Dennis Sperzel Date: Wed, 31 Jan 2024 08:37:42 +0100 Subject: [PATCH] testing: addition base case to tenscolumns --- test/test_addition.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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