9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
23 BOOST_AUTO_TEST_SUITE(Surfaces)
27 double rX = circleCase ? rY : 5.;
36 rX, rY, start, direction);
37 BOOST_CHECK(not nosol.first);
38 BOOST_CHECK(not nosol.second);
44 rX, rY, start, direction);
46 BOOST_CHECK(twosol.first);
47 BOOST_CHECK(twosol.second);
55 rX, rY, start, direction);
57 BOOST_CHECK(onesolY.first);
59 BOOST_CHECK(not onesolY.second);
67 rX, rY, start, direction);
69 BOOST_CHECK(onesolX.first);
71 BOOST_CHECK(not onesolX.second);
83 BOOST_CHECK(not solution);
89 BOOST_CHECK(solution);
98 double radiusX = 450.;
99 double radiusY = 275.;
105 radiusX, radiusY, start, direction);
108 BOOST_CHECK(solution.first);
112 BOOST_CHECK(solution.first.pathLength > 0.);
114 BOOST_CHECK(solution.second);
118 BOOST_CHECK(solution.second.pathLength > 0.);
138 BOOST_CHECK(solution.first);
142 BOOST_CHECK(solution.first.pathLength > 0.);
144 BOOST_CHECK(solution.second);
148 BOOST_CHECK(solution.second.pathLength > 0.);
152 direction =
Vector2D(1., 1.).normalized();
156 BOOST_CHECK(solution.first);
159 BOOST_CHECK(solution.first.pathLength < 0.);
161 BOOST_CHECK(solution.second);
164 BOOST_CHECK(solution.second.pathLength < 0.);
167 direction =
Vector2D(-1., -1.).normalized();
171 BOOST_CHECK(solution.first);
174 BOOST_CHECK(solution.first.pathLength > 0.);
176 BOOST_CHECK(solution.second);
179 BOOST_CHECK(solution.second.pathLength > 0.);
182 BOOST_AUTO_TEST_SUITE_END()