From 7a8bce98779c0a17d97b932a6fd06a16cb977736 Mon Sep 17 00:00:00 2001 From: AkinshinaDA Date: Fri, 21 Mar 2025 01:20:32 +0300 Subject: [PATCH] =?UTF-8?q?build:=204.=20=D0=9C=D0=BE=D0=B4=D1=83=D0=BB?= =?UTF-8?q?=D1=8C=D0=BD=D1=8B=D0=B5=20=D1=82=D0=B5=D1=81=D1=82=D1=8B.=20?= =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=20=D1=84=D0=B0?= =?UTF-8?q?=D0=B9=D0=BB=20unittest.cpp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- unittest.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 unittest.cpp diff --git a/unittest.cpp b/unittest.cpp new file mode 100644 index 0000000..a9ba7e5 --- /dev/null +++ b/unittest.cpp @@ -0,0 +1,12 @@ +#define DOCTEST_CONFIG_NO_MULTITHREADING +#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN +#include "doctest.h" +#include "histogram_internal.h" + +TEST_CASE("distinct positive numbers") { + double min = 0; + double max = 0; + find_minmax({1, 2}, min, max); + CHECK(min == 1); + CHECK(max == 2); +}