Browse Source

Update test_calculator.c

master
fdai7782 11 months ago
parent
commit
abcacc504d
  1. 16
      src/test/c/test_calculator.c

16
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

Loading…
Cancel
Save