From abcacc504d3de23d15fa7b8af9fd88d214ab01fa Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Fri, 9 Feb 2024 22:55:30 +0000 Subject: [PATCH] Update test_calculator.c --- src/test/c/test_calculator.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/test/c/test_calculator.c b/src/test/c/test_calculator.c index e46172e..2bf4c3d 100644 --- a/src/test/c/test_calculator.c +++ b/src/test/c/test_calculator.c @@ -1,4 +1,3 @@ - #include "unity.h" #include "BasicMode.h" #include "main_calculator.h" @@ -17,17 +16,6 @@ void tearDown(void) void test_addition(void) { - /* arrange */ - char* result; - char expected[] = "2\n"; - - /* act */ - result = convert(2); - - /* assert */ -} - -#endif // TEST double result = add(1, 2); TEST_ASSERT_EQUAL(3, result); @@ -221,7 +209,7 @@ void test_DecToBin(void) { result = DecToBin(8); // Assert - TEST_ASSERT_EQUAL_INT64(100, result); + TEST_ASSERT_EQUAL_INT64(1000 , result); } void test_BinToDec(void) { // Arrange @@ -231,7 +219,7 @@ void test_BinToDec(void) { result = BinToDec(100); // Assert - TEST_ASSERT_EQUAL_INT64(8, result); + TEST_ASSERT_EQUAL_INT64(4, result); } void test_additionbin(void) { // Arrange