From bb18fb7e4b37fe1be93f4a393062770e15244f21 Mon Sep 17 00:00:00 2001 From: Laurin Date: Wed, 31 Jan 2024 00:05:23 +0100 Subject: [PATCH] added test for binaryStrLen in case input is 0 --- 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 c049622..114b83a 100644 --- a/test/conversionOfNumbers/test_conversionOfNumbers.c +++ b/test/conversionOfNumbers/test_conversionOfNumbers.c @@ -24,6 +24,18 @@ void test_binaryStringLengthOfInput5is3(){ //act result = binaryStrLen(5); + //assert + TEST_ASSERT_EQUAL_INT(expected, result); +} + +void test_binaryStringLengthOfInput0is1(){ + //arrange + int result; + int expected = 1; + + //act + result = binaryStrLen(0); + //assert TEST_ASSERT_EQUAL_INT(expected, result); } \ No newline at end of file