diff --git a/unittest.cbp b/unittest.cbp index 6291924..1310ca3 100644 --- a/unittest.cbp +++ b/unittest.cbp @@ -32,6 +32,7 @@ + diff --git a/unittest.cpp b/unittest.cpp index 3cdd704..9646fb8 100644 --- a/unittest.cpp +++ b/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::vectorv{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); +}