From b1add835864a5907dc5a674f7eee2f3db038f704 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 3 Jan 2022 18:28:10 +0000 Subject: More complete and tested stream output support --- test/test-text.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'test') diff --git a/test/test-text.cpp b/test/test-text.cpp index 93a831e..6762b09 100644 --- a/test/test-text.cpp +++ b/test/test-text.cpp @@ -5,7 +5,11 @@ #include #include +#include +#include +#include #include +#include struct FontTest : public Font { FontTest() : Font {"/usr/share/fonts/corefonts/arial.ttf", 48} { } @@ -89,3 +93,23 @@ BOOST_AUTO_TEST_CASE(render_text) } BOOST_AUTO_TEST_SUITE_END() + +BOOST_AUTO_TEST_CASE(stream_vec) +{ + BOOST_CHECK_EQUAL(streamed_string(glm::vec3 {1.2, 2.3, 3.4}), "(1.2, 2.3, 3.4)"); +} + +BOOST_AUTO_TEST_CASE(stream_array) +{ + BOOST_CHECK_EQUAL(streamed_string(std::array {1.2, 2.3, 3.4}), "(1.2, 2.3, 3.4)"); +} + +BOOST_AUTO_TEST_CASE(stream_vector) +{ + BOOST_CHECK_EQUAL(streamed_string(std::vector {1.2, 2.3, 3.4}), "(1.2, 2.3, 3.4)"); +} + +BOOST_AUTO_TEST_CASE(stream_mat) +{ + BOOST_CHECK_EQUAL(streamed_string(glm::mat2 {1.2, 2.3, 3.4, 4.5}), "((1.2, 2.3), (3.4, 4.5))"); +} -- cgit v1.2.3