|
|
@ -0,0 +1,20 @@ |
|
|
|
#include "unity.h" // Include the Unity header file |
|
|
|
#include "../src/convert_ton_to_kg.h" |
|
|
|
#include "limits.h" |
|
|
|
// Test setup function |
|
|
|
void setUp(void) { |
|
|
|
// This function will be called before each test |
|
|
|
} |
|
|
|
|
|
|
|
// Test teardown function |
|
|
|
void tearDown(void) { |
|
|
|
// This function will be called after each test |
|
|
|
} |
|
|
|
|
|
|
|
// Test case for tons_to_kg function |
|
|
|
void test_tons_to_kg(void) { |
|
|
|
// Test case |
|
|
|
double input = 2.5; |
|
|
|
double expected_output = 2500.0; |
|
|
|
TEST_ASSERT_EQUAL_DOUBLE(expected_output, tons_to_kg(input)); |
|
|
|
} |