code: индивидуальный вариант
Этот коммит содержится в:
19
unittest.cpp
19
unittest.cpp
@@ -2,7 +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 "verif.h"
|
||||||
TEST_CASE("distinct positive numbers") {
|
TEST_CASE("distinct positive numbers") {
|
||||||
double min = 0;
|
double min = 0;
|
||||||
double max = 0;
|
double max = 0;
|
||||||
@@ -38,3 +38,20 @@ TEST_CASE("identical elements") {
|
|||||||
CHECK (min == 1);
|
CHECK (min == 1);
|
||||||
CHECK (max == 1);
|
CHECK (max == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_CASE("distinct interval1") {
|
||||||
|
double interval = 5;
|
||||||
|
bool check;
|
||||||
|
verification(check);
|
||||||
|
CHECK (check == true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_CASE("distinct interval2") {
|
||||||
|
double interval = 10;
|
||||||
|
bool check;
|
||||||
|
verification(check);
|
||||||
|
CHECK (check == false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user