diff --git a/lab01.layout b/lab01.layout new file mode 100644 index 0000000..72f3f6b --- /dev/null +++ b/lab01.layout @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/unittest.cpp b/unittest.cpp deleted file mode 100644 index 5a32d95..0000000 --- a/unittest.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN -#include "doctest.h" -#include "histogram_internal.h" -#include - -TEST_CASE("distinct positive numbers") { - double min = 0; - double max = 0; - find_minmax({1, 2}, min, max); - CHECK(min == 1); - CHECK(max == 2); -} - -TEST_CASE("find_minmax with one element") { - std::vector numbers{42}; - double min, max; - find_minmax(numbers, min, max); - CHECK(min == 42); - CHECK(max == 42); -} - -TEST_CASE("find_minmax with negative values") { - std::vector numbers{-10.5, -2.3, -3.3}; - double min, max; - find_minmax(numbers, min, max); - CHECK(min == -10.5); - CHECK(max == -2.3); -} - -TEST_CASE("find_minmax with identical elements") { - std::vector numbers{7, 7, 7, 7}; - double min, max; - find_minmax(numbers, min, max); - CHECK(min == 7); - CHECK(max == 7); -} diff --git a/unittest.layout b/unittest.layout new file mode 100644 index 0000000..3c4340e --- /dev/null +++ b/unittest.layout @@ -0,0 +1,10 @@ + + + + + + + + + +