|
|
@ -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)); |
|
|
|
} |