forked from boostorg/static_string
Add ostream tests
This commit is contained in:
@ -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();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user