From 745dc02d3c751450a2aca7d74a984f04567062a2 Mon Sep 17 00:00:00 2001 From: Sandro Welte Date: Fri, 9 Feb 2024 17:16:21 +0100 Subject: [PATCH] Comitted Unit Test --- test/test_convert_g_to_mg.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/test_convert_g_to_mg.c diff --git a/test/test_convert_g_to_mg.c b/test/test_convert_g_to_mg.c new file mode 100644 index 0000000..46b6755 --- /dev/null +++ b/test/test_convert_g_to_mg.c @@ -0,0 +1,20 @@ +#include "unity.h" // Include the Unity header file +#include "../src/convert_g_to_mg.h" // Include the header file containing the function to be tested + +// Test setup function +void setUp(void) { + // This function will be called before each test +} + +// Test teardown function +void tearDown(void) { + +} + +// Test case for g_to_mg function +void test_g_to_mg(void) { + // Test case + double input = 1.0; + double expected_output = 1000.0; + TEST_ASSERT_EQUAL_DOUBLE(expected_output, g_to_mg(input)); +}