From 0d8c89547d126a18cb2f59a5c84686ecb2f0e274 Mon Sep 17 00:00:00 2001 From: Leon Wolf Date: Fri, 9 Feb 2024 16:59:56 +0100 Subject: [PATCH] Commited Unit Test cm in dm --- test/test_convert_cm_in_dm.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/test_convert_cm_in_dm.c diff --git a/test/test_convert_cm_in_dm.c b/test/test_convert_cm_in_dm.c new file mode 100644 index 0000000..3bce101 --- /dev/null +++ b/test/test_convert_cm_in_dm.c @@ -0,0 +1,18 @@ +#include "../src/convert_cm_in_dm.h" +#include "unity.h" +#include "limits.h" + +void setUp(void) { + // Set up resources here if needed +} + +void tearDown(void) { + // Clean up resources here if needed +} +void test_cm_to_dm(void) { + // Testfall 1: 100 cm sollten 10 Dezimeter sein + double value_1 = 100.0; + double expectedResult_1 = 10.0; + double result_1 = cm_to_dm(value_1); + TEST_ASSERT_EQUAL_FLOAT(expectedResult_1, result_1); +} \ No newline at end of file