|
@@ -835,6 +835,7 @@ static void
|
|
|
test_container_order_functions(void)
|
|
|
{
|
|
|
int lst[25], n = 0;
|
|
|
+ unsigned int lst2[25];
|
|
|
|
|
|
|
|
|
#define median() median_int(lst, n)
|
|
@@ -856,6 +857,28 @@ test_container_order_functions(void)
|
|
|
test_eq(25, median());
|
|
|
#undef median
|
|
|
|
|
|
+#define third_quartile() third_quartile_uint32(lst2, n)
|
|
|
+
|
|
|
+ n = 0;
|
|
|
+ lst2[n++] = 1;
|
|
|
+ test_eq(1, third_quartile());
|
|
|
+ lst2[n++] = 2;
|
|
|
+ test_eq(2, third_quartile());
|
|
|
+ lst2[n++] = 3;
|
|
|
+ lst2[n++] = 4;
|
|
|
+ lst2[n++] = 5;
|
|
|
+ test_eq(4, third_quartile());
|
|
|
+ lst2[n++] = 6;
|
|
|
+ lst2[n++] = 7;
|
|
|
+ lst2[n++] = 8;
|
|
|
+ lst2[n++] = 9;
|
|
|
+ test_eq(7, third_quartile());
|
|
|
+ lst2[n++] = 10;
|
|
|
+ lst2[n++] = 11;
|
|
|
+ test_eq(9, third_quartile());
|
|
|
+
|
|
|
+#undef third_quartile
|
|
|
+
|
|
|
done:
|
|
|
;
|
|
|
}
|