|
|
@ -2,6 +2,7 @@
|
|
|
|
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
|
|
|
|
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
|
|
|
|
#include "doctest.h"
|
|
|
|
#include "doctest.h"
|
|
|
|
#include "histogram_internal.h"
|
|
|
|
#include "histogram_internal.h"
|
|
|
|
|
|
|
|
#include "sr.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TEST_CASE("distinct positive numbers") {
|
|
|
|
TEST_CASE("distinct positive numbers") {
|
|
|
@ -38,3 +39,11 @@ TEST_CASE("vector with same elements") {
|
|
|
|
CHECK(min == 2);
|
|
|
|
CHECK(min == 2);
|
|
|
|
CHECK(max == 2);
|
|
|
|
CHECK(max == 2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST_CASE("Empty vector"){
|
|
|
|
|
|
|
|
double min = 0;
|
|
|
|
|
|
|
|
double max = 0;
|
|
|
|
|
|
|
|
std::vector<double> numbers {};
|
|
|
|
|
|
|
|
CHECK(find_minmax(numbers, min, max) == false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|