9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
25 BOOST_AUTO_TEST_SUITE(Surfaces)
29 double rX = circleCase ? rY : 5.;
38 rX, rY, start, direction);
39 BOOST_CHECK(not nosol[0]);
40 BOOST_CHECK(not nosol[1]);
46 rX, rY, start, direction);
48 BOOST_CHECK(twosol[0]);
49 BOOST_CHECK(twosol[1]);
57 rX, rY, start, direction);
59 BOOST_CHECK(onesolY[0]);
61 BOOST_CHECK(not onesolY[1]);
69 rX, rY, start, direction);
71 BOOST_CHECK(onesolX[0]);
73 BOOST_CHECK(not onesolX[1]);
85 BOOST_CHECK(not solution);
91 BOOST_CHECK(solution);
95 dir =
Vector2(2, 1).normalized();
100 BOOST_CHECK(solution);
105 BOOST_CHECK(not solution);
114 double radiusX = 450.;
115 double radiusY = 275.;
121 radiusX, radiusY, start, direction);
124 BOOST_CHECK(solution[0]);
130 BOOST_CHECK(solution[1]);
145 double radius = 275.;
154 BOOST_CHECK(solution[0]);
160 BOOST_CHECK(solution[1]);
168 direction =
Vector2(1., 1.).normalized();
172 BOOST_CHECK(solution[0]);
177 BOOST_CHECK(solution[1]);
183 direction =
Vector2(-1., -1.).normalized();
187 BOOST_CHECK(solution[0]);
192 BOOST_CHECK(solution[1]);
198 BOOST_AUTO_TEST_SUITE_END()