From 324612a30d70e1b9ea1f60bf3a554e689f6f257a Mon Sep 17 00:00:00 2001 From: Leon Wolf Date: Fri, 9 Feb 2024 16:57:52 +0100 Subject: [PATCH] Commited Unit Test calculate Factorial --- test/test_calculateFactorial .c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/test_calculateFactorial .c diff --git a/test/test_calculateFactorial .c b/test/test_calculateFactorial .c new file mode 100644 index 0000000..fa7a51b --- /dev/null +++ b/test/test_calculateFactorial .c @@ -0,0 +1,17 @@ +#include "../src/calculateFactorial.h" +#include "unity.h" +#include "limits.h" + +void setUp(void) { + // set stuff up here +} + +void tearDown(void) { + // clean stuff up here +} +void test_calculateFactorial_calculateFactorialofanumber(void) { + int expectedResult = 120; + int result; + result = calculateFactorial_integer(5); + TEST_ASSERT_EQUAL_INT(expectedResult, result); +}