9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
20 BOOST_AUTO_TEST_SUITE(Surfaces)
28 BOOST_CHECK(check.
isInside({0, 0}, ll, ur));
29 BOOST_CHECK(!check.isInside({2, 2}, ll, ur));
30 BOOST_CHECK(!check.isInside({0, 2}, ll, ur));
31 BOOST_CHECK(!check.isInside({2, 0}, ll, ur));
38 BOOST_CHECK(check.
isInside({0, 0}, ll, ur));
39 BOOST_CHECK(check.isInside({2, 2}, ll, ur));
40 BOOST_CHECK(!check.isInside({4, 4}, ll, ur));
41 BOOST_CHECK(check.isInside({0, 2}, ll, ur));
42 BOOST_CHECK(check.isInside({2, 0}, ll, ur));
55 double distance = bcheck.
distance(testPoint, ll, ur);
64 double distance = bcheck.
distance(testPoint, ll, ur);
72 cov << 1, 0.5, 0.5, 2;
76 BOOST_CHECK(check.
isInside({0, 0}, ll, ur));
77 BOOST_CHECK(check.isInside({2, 2}, ll, ur));
78 BOOST_CHECK(!check.isInside({4, 4}, ll, ur));
79 BOOST_CHECK(check.isInside({0, 3}, ll, ur));
80 BOOST_CHECK(check.isInside({3, 0}, ll, ur));
107 Vector2D vertices[] = {{-2, 0}, {2, 0}, {0, 2}};
109 BOOST_CHECK(check.
isInside({0, 0}, vertices));
110 BOOST_CHECK(check.isInside({0, 1}, vertices));
111 BOOST_CHECK(!check.isInside({2, 2}, vertices));
112 BOOST_CHECK(!check.isInside({0, -1}, vertices));
116 Vector2D vertices[] = {{-2, 0}, {2, 0}, {0, 2}};
118 cov << 0.5, 0, 0, 0.5;
120 BOOST_CHECK(check.
isInside({0, 0}, vertices));
121 BOOST_CHECK(check.isInside({0, 1}, vertices));
122 BOOST_CHECK(check.isInside({0, 2}, vertices));
123 BOOST_CHECK(check.isInside({0, 3}, vertices));
124 BOOST_CHECK(check.isInside({0, 4}, vertices));
125 BOOST_CHECK(!check.isInside({0, 5}, vertices));
127 BOOST_AUTO_TEST_SUITE_END()