diff --git a/unittest.cpp b/unittest.cpp index 727d06c..bf59ed5 100644 --- a/unittest.cpp +++ b/unittest.cpp @@ -33,4 +33,12 @@ TEST_CASE("negative elements") { find_minmax({ -81, 2 }, min, max); CHECK(min == -81); CHECK(max == 2); +} + +TEST_CASE("same element") { + double min = 0; + double max = 0; + find_minmax({ 1, 1, 1, 1, 1, 1, 1, 1, 1 }, min, max); + CHECK(min == 1); + CHECK(max == 1); } \ No newline at end of file