From c9243693b826ecfebe0734dcaf998c55d3d9b8e8 Mon Sep 17 00:00:00 2001 From: fdai7968 Date: Thu, 8 Feb 2024 18:30:07 +0000 Subject: [PATCH] code for testing average --- test/average_median/test_average_median.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/average_median/test_average_median.c b/test/average_median/test_average_median.c index 8b13789..3044fb7 100644 --- a/test/average_median/test_average_median.c +++ b/test/average_median/test_average_median.c @@ -1 +1,11 @@ +#include "unity.h" +#include "average_median.h" +void setUp(void){} + +void tearDown(void){} + +void test_average() { + double data[] = {1.0, 2.0, 3.0, 4.0, 5.0}; + TEST_ASSERT_EQUAL_DOUBLE(3.0, mean(data, 5)); +}