Browse Source

Comitted Unit Test

remotes/origin/testing
Sandro Welte 11 months ago
parent
commit
0add8b1336
  1. 21
      test/test_convert_kg_to_g.c

21
test/test_convert_kg_to_g.c

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