From 71f3896ebb253caf58f625a5b09bf5218ec74dcc Mon Sep 17 00:00:00 2001 From: BezhenarAN Date: Wed, 24 Apr 2024 07:38:09 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D0=BF=D1=83=D0=BD=D0=BA=D1=82=205=20(?= =?UTF-8?q?=D1=84=D0=B0=D0=B9=D0=BB=20=D1=80=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D0=B8=20unitttest)?= 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); +}