From 3b81a29e10223532fc91feb1da872421cd937119 Mon Sep 17 00:00:00 2001 From: Laurin Date: Wed, 31 Jan 2024 01:02:03 +0100 Subject: [PATCH] added test for implementation of binaryStrLen function --- test/conversionOfNumbers/test_conversionOfNumbers.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/conversionOfNumbers/test_conversionOfNumbers.c b/test/conversionOfNumbers/test_conversionOfNumbers.c index 114b83a..2a4e777 100644 --- a/test/conversionOfNumbers/test_conversionOfNumbers.c +++ b/test/conversionOfNumbers/test_conversionOfNumbers.c @@ -38,4 +38,16 @@ void test_binaryStringLengthOfInput0is1(){ //assert TEST_ASSERT_EQUAL_INT(expected, result); +} + +void test_convert10ToBinaryStr(){ + //arrange + char* result; + char expected[] = "1010"; + + //act + result = convertIntToBinaryStr(10); + + //assert + TEST_ASSERT_EQUAL_STRING(expected, result); } \ No newline at end of file