Browse Source

code for testing median

master
fdai7968 11 months ago
parent
commit
a2b02a1f7a
  1. 5
      test/average_median/test_average_median.c

5
test/average_median/test_average_median.c

@ -9,3 +9,8 @@ void test_average() {
double data[] = {1.0, 2.0, 3.0, 4.0, 5.0}; double data[] = {1.0, 2.0, 3.0, 4.0, 5.0};
TEST_ASSERT_EQUAL_DOUBLE(3.0, mean(data, 5)); TEST_ASSERT_EQUAL_DOUBLE(3.0, mean(data, 5));
} }
void test_median() {
double data[] = {1.0, 2.0, 3.0, 4.0, 5.0};
TEST_ASSERT_EQUAL_DOUBLE(3.0, median(data, 5));
}
Loading…
Cancel
Save