#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN #include "doctest.hpp" #include "histogram_internal.hpp" #include TEST_CASE("distinct positive numbers") { double min = 0; double max = 0; std::vector numbers3 = {-5, -3, -4, -1, -2}; find_minmax(numbers3, min, max); CHECK(min == -5); CHECK(max == -1); } TEST_CASE("vector with same elements") { double min = 0; double max = 0; std::vector numbers3 = {2,2,2}; find_minmax(numbers3, min, max); CHECK(min == 2); CHECK(max == 2); } TEST_CASE("distinct positive numbers 2") { double min = 0; double max = 0; std::vector numbers3 = {-4}; find_minmax(numbers3, min, max); CHECK(min == -4); CHECK(max == -4); }