|
@ -199,6 +199,18 @@ void test_convertBinaryStr10110ToInt22(){ |
|
|
//act |
|
|
//act |
|
|
result = convertBinaryStrToInt("10110"); |
|
|
result = convertBinaryStrToInt("10110"); |
|
|
|
|
|
|
|
|
|
|
|
//assert |
|
|
|
|
|
TEST_ASSERT_EQUAL_UINT(expected, result); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_convertHexStr2A3ToInt675(){ |
|
|
|
|
|
//arrange |
|
|
|
|
|
unsigned int result; |
|
|
|
|
|
unsigned int expected = 675; |
|
|
|
|
|
|
|
|
|
|
|
//act |
|
|
|
|
|
result = convertHexStrToInt("2A3"); |
|
|
|
|
|
|
|
|
//assert |
|
|
//assert |
|
|
TEST_ASSERT_EQUAL_UINT(expected, result); |
|
|
TEST_ASSERT_EQUAL_UINT(expected, result); |
|
|
} |
|
|
} |