|
@ -88,6 +88,18 @@ void test_convertBinaryStr11ToInt3(){ |
|
|
//act |
|
|
//act |
|
|
result = convertBinaryStrToInt("11"); |
|
|
result = convertBinaryStrToInt("11"); |
|
|
|
|
|
|
|
|
|
|
|
//assert |
|
|
|
|
|
TEST_ASSERT_EQUAL_UINT(expected, result); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_convertBinaryStr1111ToInt15(){ |
|
|
|
|
|
//arrange |
|
|
|
|
|
unsigned int result; |
|
|
|
|
|
unsigned int expected = 15; |
|
|
|
|
|
|
|
|
|
|
|
//act |
|
|
|
|
|
result = convertBinaryStrToInt("1111"); |
|
|
|
|
|
|
|
|
//assert |
|
|
//assert |
|
|
TEST_ASSERT_EQUAL_UINT(expected, result); |
|
|
TEST_ASSERT_EQUAL_UINT(expected, result); |
|
|
} |
|
|
} |