|
@ -24,6 +24,18 @@ void test_binaryStringLengthOfInput5is3(){ |
|
|
//act |
|
|
//act |
|
|
result = binaryStrLen(5); |
|
|
result = binaryStrLen(5); |
|
|
|
|
|
|
|
|
|
|
|
//assert |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(expected, result); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_binaryStringLengthOfInput0is1(){ |
|
|
|
|
|
//arrange |
|
|
|
|
|
int result; |
|
|
|
|
|
int expected = 1; |
|
|
|
|
|
|
|
|
|
|
|
//act |
|
|
|
|
|
result = binaryStrLen(0); |
|
|
|
|
|
|
|
|
//assert |
|
|
//assert |
|
|
TEST_ASSERT_EQUAL_INT(expected, result); |
|
|
TEST_ASSERT_EQUAL_INT(expected, result); |
|
|
} |
|
|
} |