diff --git a/test/test_convert_C_to_F.c b/test/test_convert_C_to_F.c new file mode 100644 index 0000000..a657ecb --- /dev/null +++ b/test/test_convert_C_to_F.c @@ -0,0 +1,28 @@ +#include "../src/convert_C_to_F.h" +#include "unity.h" +#include "limits.h" + + +void setUp(void) { + +} + +void tearDown(void) { + // Clean up resources here if needed +} + +void test_convert_temperature(void) { + float temperature = 100.0; + char from_unit = 'c'; + char to_unit = 'f'; + + // Perform the conversion + float result = convert_temperature(temperature, from_unit, to_unit); + + // Define the expected result (100 degrees Celsius to Fahrenheit is 212) + float expectedResult = 212; + + // Assert the result + TEST_ASSERT_EQUAL_FLOAT(expectedResult, result); +} +