From d63830bc0c448de88f4ed6f883f1b84bf7a292bd Mon Sep 17 00:00:00 2001 From: Jonas Zitzmann Date: Fri, 9 Feb 2024 16:45:13 +0100 Subject: [PATCH 1/5] Commited Unit Test --- test/test_convert_kph_to_mps.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/test_convert_kph_to_mps.c diff --git a/test/test_convert_kph_to_mps.c b/test/test_convert_kph_to_mps.c new file mode 100644 index 0000000..62b3355 --- /dev/null +++ b/test/test_convert_kph_to_mps.c @@ -0,0 +1,18 @@ +#include "../src/convert_kph_to_mps.h" +#include "unity.h" +#include "limits.h" + +void setUp(void) { + // set stuff up here +} + +void tearDown(void) { + // clean stuff up here +} + +void test_convert_kph_to_mps_kpstomps(void){ + double expectedResult = 1.0; + double result; + result = converter_kph_to_mps(3.6); + TEST_ASSERT_EQUAL_DOUBLE(expectedResult, result); +} From 5658f6af3e7f37431cba522a86266dde6d0627e2 Mon Sep 17 00:00:00 2001 From: Jonas Zitzmann Date: Fri, 9 Feb 2024 16:45:29 +0100 Subject: [PATCH 2/5] Commited Unit Test --- test/test_convert_kph_to_mps.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test_convert_kph_to_mps.c b/test/test_convert_kph_to_mps.c index 62b3355..8d09c7b 100644 --- a/test/test_convert_kph_to_mps.c +++ b/test/test_convert_kph_to_mps.c @@ -16,3 +16,10 @@ void test_convert_kph_to_mps_kpstomps(void){ result = converter_kph_to_mps(3.6); TEST_ASSERT_EQUAL_DOUBLE(expectedResult, result); } + +void test_convert_kph_to_mps_mpstokps(void){ + double expectedResult = 3.6; + double result; + result = converter_mps_to_kph(1.0); + TEST_ASSERT_EQUAL_DOUBLE(expectedResult, result); +} \ No newline at end of file From 681fe75ea791b655fe62b596c6a79e36c9c57b0a Mon Sep 17 00:00:00 2001 From: Jonas Zitzmann Date: Fri, 9 Feb 2024 16:46:29 +0100 Subject: [PATCH 3/5] Commited Unit Test --- test/test_convert_time.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/test_convert_time.c diff --git a/test/test_convert_time.c b/test/test_convert_time.c new file mode 100644 index 0000000..0447a7f --- /dev/null +++ b/test/test_convert_time.c @@ -0,0 +1,18 @@ +#include "../src/convert_time.h" +#include "unity.h" +#include "limits.h" + +void setUp(void) { + // set stuff up here +} + +void tearDown(void) { + // clean stuff up here +} + +void test_convert_time_sectomin(void){ + double expectedResult = 1.0; + double result; + result = converter_sec_to_min(60.0); + TEST_ASSERT_EQUAL_DOUBLE(expectedResult, result); +} From 47c05af1780e200eed370cac0414401d1a4da1b6 Mon Sep 17 00:00:00 2001 From: Jonas Zitzmann Date: Fri, 9 Feb 2024 16:46:51 +0100 Subject: [PATCH 4/5] Commited Unit Test --- test/test_convert_time.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test_convert_time.c b/test/test_convert_time.c index 0447a7f..f4e3712 100644 --- a/test/test_convert_time.c +++ b/test/test_convert_time.c @@ -16,3 +16,10 @@ void test_convert_time_sectomin(void){ result = converter_sec_to_min(60.0); TEST_ASSERT_EQUAL_DOUBLE(expectedResult, result); } + +void test_convert_time_mintosec(void){ + double expectedResult = 60.0; + double result; + result = converter_min_to_sec(1.0); + TEST_ASSERT_EQUAL_DOUBLE(expectedResult, result); +} From 4a5396cb7fc6bf02bf4c32a2a54c70308a1f6b2b Mon Sep 17 00:00:00 2001 From: Jonas Zitzmann Date: Fri, 9 Feb 2024 16:48:01 +0100 Subject: [PATCH 5/5] Commited Unit Test --- test/test_convert_time.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test_convert_time.c b/test/test_convert_time.c index f4e3712..dfec27a 100644 --- a/test/test_convert_time.c +++ b/test/test_convert_time.c @@ -23,3 +23,10 @@ void test_convert_time_mintosec(void){ result = converter_min_to_sec(1.0); TEST_ASSERT_EQUAL_DOUBLE(expectedResult, result); } + +void test_convert_time_hourtomin(void){ + double expectedResult = 60.0; + double result; + result = converter_hour_to_min(1.0); + TEST_ASSERT_EQUAL_DOUBLE(expectedResult, result); +}