From 800303f3dc6f3f359787bbbc4a2b3a9024b708bc Mon Sep 17 00:00:00 2001 From: Leon Wolf Date: Fri, 9 Feb 2024 17:05:04 +0100 Subject: [PATCH] Commited Unit Test m in km --- test/test_convert_M_in_KM.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/test_convert_M_in_KM.c diff --git a/test/test_convert_M_in_KM.c b/test/test_convert_M_in_KM.c new file mode 100644 index 0000000..0a0b4c3 --- /dev/null +++ b/test/test_convert_M_in_KM.c @@ -0,0 +1,18 @@ +#include "../src/convert_M_in_KM.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_meter_to_kilometer(void) { + // Testfall 1: 1000 Meter sollten 1 Kilometer sein + double value_1 = 1000.0; + double expectedResult_1 = 1.0; + double result_1 = meter_to_kilometer(value_1); + TEST_ASSERT_EQUAL_FLOAT(expectedResult_1, result_1); +}