2017-11-22 16:49:37 +11:00
|
|
|
#include "../tap.hpp"
|
2017-01-09 15:54:47 +11:00
|
|
|
|
2017-11-22 16:49:37 +11:00
|
|
|
#include "../stream.hpp"
|
2017-01-09 15:54:47 +11:00
|
|
|
|
2018-01-09 16:28:25 +11:00
|
|
|
#include <sstream>
|
|
|
|
|
2017-01-09 15:54:47 +11:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
template <typename T>
|
|
|
|
void
|
2018-08-05 14:42:02 +10:00
|
|
|
test_scoped (cruft::TAP::logger&);
|
2017-01-09 15:54:47 +11:00
|
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
template <>
|
|
|
|
void
|
2018-08-05 14:42:02 +10:00
|
|
|
test_scoped<cruft::stream::scoped::flags> (cruft::TAP::logger &tap)
|
2017-01-09 15:54:47 +11:00
|
|
|
{
|
|
|
|
std::ostringstream os;
|
|
|
|
|
|
|
|
{
|
2018-08-05 14:42:02 +10:00
|
|
|
cruft::stream::scoped::flags f (os);
|
2017-01-09 15:54:47 +11:00
|
|
|
os << std::hex;
|
|
|
|
}
|
|
|
|
|
|
|
|
os << 15;
|
|
|
|
|
|
|
|
tap.expect_eq (os.str (), "15", "stream::scoped::flag reverts std::hex");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
int
|
|
|
|
main (int, char **)
|
|
|
|
{
|
2018-08-05 14:42:02 +10:00
|
|
|
cruft::TAP::logger tap;
|
2017-01-09 15:54:47 +11:00
|
|
|
|
2018-08-05 14:42:02 +10:00
|
|
|
test_scoped<cruft::stream::scoped::flags> (tap);
|
2017-01-09 15:54:47 +11:00
|
|
|
|
|
|
|
return tap.status ();
|
|
|
|
}
|