From 9668fafaea0c767a935c2f3f41bb8f72a7bbfa1b Mon Sep 17 00:00:00 2001 From: "lab34 (BakaikinKV)" Date: Wed, 16 Apr 2025 18:17:11 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D1=82=D0=B5=D1=81=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- unittest.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/unittest.cpp b/unittest.cpp index a9ba7e5..26f2524 100644 --- a/unittest.cpp +++ b/unittest.cpp @@ -10,3 +10,17 @@ TEST_CASE("distinct positive numbers") { CHECK(min == 1); CHECK(max == 2); } +TEST_CASE("distinct negative numbers"){ + double min = 0; + double max = 0; + find_minmax({-1, -2}, min, max); + CHECK(min == -2); + CHECK(max == -1); +} +TEST_CASE("vector of the same elements"){ + double min = 0; + double max = 0; + find_minmax({3,3,3}, min, max); + CHECK(min == 3); + CHECK(max == 3); +}