From a2b02a1f7a15ae9de2baa910c8c9976ebcde4ce1 Mon Sep 17 00:00:00 2001 From: fdai7968 Date: Thu, 8 Feb 2024 18:30:28 +0000 Subject: [PATCH] code for testing median --- test/average_median/test_average_median.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/average_median/test_average_median.c b/test/average_median/test_average_median.c index 3044fb7..8cd5e65 100644 --- a/test/average_median/test_average_median.c +++ b/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}; 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)); +}