Browse Source

Comitted Unit Test

remotes/origin/testing
Sandro Welte 11 months ago
parent
commit
745dc02d3c
  1. 20
      test/test_convert_g_to_mg.c

20
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));
}
Loading…
Cancel
Save