From 0add8b13362058e253ebf5c3a60497205fd5c93a Mon Sep 17 00:00:00 2001 From: Sandro Welte Date: Fri, 9 Feb 2024 17:16:41 +0100 Subject: [PATCH] Comitted Unit Test --- test/test_convert_kg_to_g.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/test_convert_kg_to_g.c 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)); +}