From 5e1808485d7e613e14ffb190dbde57c5efa4d8c1 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 19 Feb 2020 20:43:15 -0500 Subject: [PATCH] Add ostream tests --- test/static_string.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/static_string.cpp b/test/static_string.cpp index 4defb1d..5ec305e 100644 --- a/test/static_string.cpp +++ b/test/static_string.cpp @@ -15,7 +15,7 @@ #include "constexpr_tests.hpp" -#include +#include namespace boost { namespace static_string { @@ -6946,6 +6946,15 @@ testResize() BOOST_TEST(b.size() == 2); } +void +testStream() +{ + std::stringstream a; + static_string<10> b; + a << b; + BOOST_TEST(a.str() == b.subview()); +} + int runTests() { @@ -6983,6 +6992,7 @@ runTests() testHash(); testEmpty(); + testStream(); return report_errors(); }