9 #include <boost/test/tools/output_test_stream.hpp>
10 #include <boost/test/unit_test.hpp>
16 using boost::test_tools::output_test_stream;
21 BOOST_AUTO_TEST_SUITE(Utilities)
23 output_test_stream output;
26 Frustum2f2 fr({1, 0}, {0, 2},
M_PI / 2.);
28 BOOST_CHECK_EQUAL(fr.origin(),
Vector2F(1, 0));
31 const auto& normals = fr.normals();
32 BOOST_CHECK_EQUAL(normals.size(), 3
u);
34 fr.svg(output, 200, 200);
35 BOOST_CHECK(!output.is_empty(
true));
38 Frustum3f3 fr33({1, 0, 0}, {0, 2, 1},
M_PI / 2.);
40 BOOST_CHECK_EQUAL(fr33.origin(),
Vector3F(1, 0, 0));
43 const auto& normals33 = fr33.normals();
44 BOOST_CHECK_EQUAL(normals33.size(), 4
u);
51 Frustum3f4 fr34({1, 0, 0}, {0, 2, 1},
M_PI / 2.);
53 BOOST_CHECK_EQUAL(fr34.origin(),
Vector3F(1, 0, 0));
56 const auto& normals34 = fr34.normals();
57 BOOST_CHECK_EQUAL(normals34.size(), 5
u);
61 BOOST_AUTO_TEST_SUITE_END()