Browse Source

Comitted Unit Test

remotes/origin/testing
Sandro Welte 11 months ago
parent
commit
339ea4e1af
  1. 20
      test/test_convert_ton_to_kg.c

20
test/test_convert_ton_to_kg.c

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