Danila 2 лет назад
Родитель 7e6b2fe398
Сommit f9c7786f29

@ -32,6 +32,7 @@
<Add option="-Wall" />
</Compiler>
<Unit filename=".gitignore" />
<Unit filename="project/emptiness_width.h" />
<Unit filename="project/histogram.cpp" />
<Unit filename="project/histogram_internal.h" />
<Unit filename="unittest.cpp" />

@ -6,7 +6,7 @@
#include "project/svg.h"
#include "project/emptiness_width.h"
/* TEST_CASE("distinct positive numbers 1")
TEST_CASE("distinct positive numbers")
{
double min = 0;
double max = 0;
@ -15,18 +15,6 @@
CHECK(max == 2);
}
TEST_CASE("distinct positive numbers 2") {
double min = 0;
double max = 0;
std::vector<double>v{2,1};
CHECK(v.size() != 0);
CHECK(v.size() != 1);
find_minmax({1, 2}, min, max);
CHECK(min == 1);
CHECK(max == 2);
CHECK(min != max);
}
TEST_CASE("vector with one element") {
double min = 0;
double max = 0;
@ -43,7 +31,14 @@ TEST_CASE("vector with same elements") {
CHECK(max == 2);
}
*/
TEST_CASE("void vector") {
double min = 0;
double max = 0;
find_minmax({0}, min, max);
CHECK(min == 0);
CHECK(max == 0);
}
TEST_CASE("test1 var 5")
{
@ -61,6 +56,13 @@ TEST_CASE("test2 var 5")
CHECK(c != b-a);
}
TEST_CASE("test3 var 5")
{
size_t a = 100;
size_t b = a;
size_t c = emptiness_width (a,b);
CHECK(c == 0);
}

Загрузка…
Отмена
Сохранить