|
|
@ -115,4 +115,22 @@ void test_addition_addition_basecasetotenscolumns(void) |
|
|
|
TEST_ASSERT_EQUAL_UINT(expected[4], result[4]); |
|
|
|
} |
|
|
|
|
|
|
|
void test_addition_addition_allunsignedinteger(void) |
|
|
|
{ |
|
|
|
unsigned int result[5]; |
|
|
|
unsigned int expected[5] = { 88879736, __UINT32_MAX__, 66558, __UINT32_MAX__, 477905879 }; |
|
|
|
|
|
|
|
result[0] = addition(13456275, 75423461); |
|
|
|
result[1] = addition(4294967294, 1); |
|
|
|
result[2] = addition(1023, 65535); |
|
|
|
result[3] = addition(0, 4294967295); |
|
|
|
result[4] = addition(54321567,423584312); |
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_UINT(expected[0], result[0]); |
|
|
|
TEST_ASSERT_EQUAL_UINT(expected[1], result[1]); |
|
|
|
TEST_ASSERT_EQUAL_UINT(expected[2], result[2]); |
|
|
|
TEST_ASSERT_EQUAL_UINT(expected[3], result[3]); |
|
|
|
TEST_ASSERT_EQUAL_UINT(expected[4], result[4]); |
|
|
|
} |
|
|
|
|
|
|
|
#endif // TEST |