osrm-backend/test/t/test_point.cpp
Michael Krasnyk 6bee8866de Squashed 'third_party/vtzero/' content from commit 2b43c8f5c
git-subtree-dir: third_party/vtzero
git-subtree-split: 2b43c8f5c7cc461a874a657673dfc15f8fb21d1d
2018-04-19 22:03:52 +03:00

26 lines
401 B
C++

#include <test.hpp>
#include <vtzero/geometry.hpp>
TEST_CASE("default constructed point") {
vtzero::point p{};
REQUIRE(p.x == 0);
REQUIRE(p.y == 0);
}
TEST_CASE("point") {
vtzero::point p1{4, 5};
vtzero::point p2{5, 4};
vtzero::point p3{4, 5};
REQUIRE(p1.x == 4);
REQUIRE(p1.y == 5);
REQUIRE_FALSE(p1 == p2);
REQUIRE(p1 != p2);
REQUIRE(p1 == p3);
}