From 7c0bee3c9f055b1adf3fe0cb3d88b6b37eefd7c3 Mon Sep 17 00:00:00 2001 From: Laurin Date: Tue, 30 Jan 2024 23:15:32 +0100 Subject: [PATCH] added test to convert 2 into binary string --- .../test_conversionOfNumbers.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/conversionOfNumbers/test_conversionOfNumbers.c diff --git a/test/conversionOfNumbers/test_conversionOfNumbers.c b/test/conversionOfNumbers/test_conversionOfNumbers.c new file mode 100644 index 0000000..2490896 --- /dev/null +++ b/test/conversionOfNumbers/test_conversionOfNumbers.c @@ -0,0 +1,17 @@ +#include "unity.h" +#include "conversionOfNumbers.h" + +void setUp(){} +void tearDown(){} + +void test_convert2ToBinaryStr(){ + //arrange + char* result; + char expected[] = "10"; + + //act + result = convertIntToBinaryStr(2); + + //assert + TEST_ASSERT_EQUAL_STRING(expected, result); +} \ No newline at end of file