Add ostream tests

This commit is contained in:
Krystian Stasiowski
2020-02-19 20:43:15 -05:00
parent 843b458087
commit 5e1808485d

View File

@ -15,7 +15,7 @@
#include "constexpr_tests.hpp" #include "constexpr_tests.hpp"
#include <iostream> #include <sstream>
namespace boost { namespace boost {
namespace static_string { namespace static_string {
@ -6946,6 +6946,15 @@ testResize()
BOOST_TEST(b.size() == 2); BOOST_TEST(b.size() == 2);
} }
void
testStream()
{
std::stringstream a;
static_string<10> b;
a << b;
BOOST_TEST(a.str() == b.subview());
}
int int
runTests() runTests()
{ {
@ -6983,6 +6992,7 @@ runTests()
testHash(); testHash();
testEmpty(); testEmpty();
testStream();
return report_errors(); return report_errors();
} }