diff --git a/test/test_convert_kg_to_g.c b/test/test_convert_kg_to_g.c new file mode 100644 index 0000000..53d0fd8 --- /dev/null +++ b/test/test_convert_kg_to_g.c @@ -0,0 +1,21 @@ +#include "unity.h" +#include "../src/convert_kg_to_g.h" + + + +void setUp(void) { + +} + +// Test teardown function +void tearDown(void) { + // This function will be called after each test +} + +// Test case for kg_to_gram function +void test_kg_to_gram(void) { + // Test case + double input = 2.5; + double expected_output = 2500.0; + TEST_ASSERT_EQUAL_DOUBLE(expected_output, kg_to_gram(input)); +}