diff --git a/test/test_convert_kph_to_mps.c b/test/test_convert_kph_to_mps.c new file mode 100644 index 0000000..8d09c7b --- /dev/null +++ b/test/test_convert_kph_to_mps.c @@ -0,0 +1,25 @@ +#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); +} + +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 diff --git a/test/test_convert_time.c b/test/test_convert_time.c new file mode 100644 index 0000000..dfec27a --- /dev/null +++ b/test/test_convert_time.c @@ -0,0 +1,32 @@ +#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); +} + +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); +} + +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); +}