|
@ -124,6 +124,19 @@ void test_convert3ToHexStr3(){ |
|
|
//act |
|
|
//act |
|
|
result = convertIntToHex(3); |
|
|
result = convertIntToHex(3); |
|
|
|
|
|
|
|
|
|
|
|
//assert |
|
|
|
|
|
TEST_ASSERT_EQUAL_STRING(expected, result); |
|
|
|
|
|
free(result); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_convert12ToHexStrC(){ |
|
|
|
|
|
//arrange |
|
|
|
|
|
char* result; |
|
|
|
|
|
char expected[] = "C"; |
|
|
|
|
|
|
|
|
|
|
|
//act |
|
|
|
|
|
result = convertIntToHex(12); |
|
|
|
|
|
|
|
|
//assert |
|
|
//assert |
|
|
TEST_ASSERT_EQUAL_STRING(expected, result); |
|
|
TEST_ASSERT_EQUAL_STRING(expected, result); |
|
|
free(result); |
|
|
free(result); |