#define DOCTEST_CONFIG_NO_MULTITHREADING
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "doctest.h"
#include "histogram_internal.h"
#include "svg.h"

TEST_CASE("Too big") {
    int BLOCKWIDTH =40;
    CHECK(inbl(BLOCKWIDTH) == false);
}
TEST_CASE("Too small") {
    int BLOCKWIDTH =1;
    CHECK(inbl(BLOCKWIDTH) == false);
}
TEST_CASE("ok ") {
    int BLOCKWIDTH =12;
    CHECK(inbl(BLOCKWIDTH) == true);
}
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("distinct identical numbers") {
    double min = 0;
    double max = 0;
    find_minmax({5, 5}, min, max);
    CHECK(min == 5);
    CHECK(max == 5);
}

TEST_CASE("distinct one number") {
    double min = 0;
    double max = 0;
    find_minmax({3}, min, max);
    CHECK(min == 3);
    CHECK(max == 3);
}

TEST_CASE("distinct negative numbers") {
    double min = 0;
    double max = 0;
    find_minmax({-3, -1}, min, max);
    CHECK(min == -3);
    CHECK(max == -1);
}
TEST_CASE("empty arr") {
    double min = 0;
    double max = 0;

    CHECK(find_minmax({}, min, max) == false);
    CHECK(find_minmax({3,4}, min, max) == true);

;
}

