#define DOCTEST_CONFIG_NO_MULTITHREADING #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN #include "doctest.h" #include "histogram_internal.h" #include #include "svg_iternal.h" 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("negative numbers") { double min = 0; double max = 0; find_minmax({ -10, 10 }, min, max); CHECK(min == -10); CHECK(max == 10); } TEST_CASE("empty numbers") { double min = 0; double max = 0; find_minmax({ }, min, max); CHECK(min != 0); CHECK(max != 0); } TEST_CASE("one number") { double min = 0; double max = 0; find_minmax({ 2 }, min, max); CHECK(min == 2); CHECK(max == 2); } TEST_CASE("Valid color without spaces") { CHECK(check_color("red") == "red"); } TEST_CASE("Invalid color with spaces") { CHECK(check_color("light blue") == "black"); } TEST_CASE("Valid color not starting with #") { CHECK(check_color("FFFFFF") == "FFFFFF"); }