From 951389500c53ceb1bd6d37d24bff63ee003f1461 Mon Sep 17 00:00:00 2001 From: fdai7968 Date: Mon, 5 Feb 2024 17:11:43 +0000 Subject: [PATCH] Corrected naming mistake --- src/multiplication/multiplication.h | 2 +- test/multiplication/test_calculator.c | 1 - test/multiplication/test_multiplication.c | 12 ++++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) delete mode 100644 test/multiplication/test_calculator.c create mode 100644 test/multiplication/test_multiplication.c diff --git a/src/multiplication/multiplication.h b/src/multiplication/multiplication.h index 697e80f..295da10 100644 --- a/src/multiplication/multiplication.h +++ b/src/multiplication/multiplication.h @@ -1,7 +1,7 @@ #ifndef multiplication_H #define multiplication_H -int multiplication(int a, int b); +int multiply(int a, int b); #endif diff --git a/test/multiplication/test_calculator.c b/test/multiplication/test_calculator.c deleted file mode 100644 index 8b13789..0000000 --- a/test/multiplication/test_calculator.c +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/multiplication/test_multiplication.c b/test/multiplication/test_multiplication.c new file mode 100644 index 0000000..e02bb41 --- /dev/null +++ b/test/multiplication/test_multiplication.c @@ -0,0 +1,12 @@ +#include "unity.h" +#include "multiplication.h" + +void setUp(void){} +void tearDown(void){} + +void test_multiplication() { + TEST_ASSERT_EQUAL_INT(6, multiply(2, 3)); + TEST_ASSERT_EQUAL_INT(-6, multiply(2, -3)); + TEST_ASSERT_EQUAL_INT(0, multiply(0, 0)); +} +