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
|
|
|
|
test_scoped (util::TAP::logger&);
|
|
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
template <>
|
|
|
|
void
|
|
|
|
test_scoped<util::stream::scoped::flags> (util::TAP::logger &tap)
|
|
|
|
{
|
|
|
|
std::ostringstream os;
|
|
|
|
|
|
|
|
{
|
|
|
|
util::stream::scoped::flags f (os);
|
|
|
|
os << std::hex;
|
|
|
|
}
|
|
|
|
|
|
|
|
os << 15;
|
|
|
|
|
|
|
|
tap.expect_eq (os.str (), "15", "stream::scoped::flag reverts std::hex");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
int
|
|
|
|
main (int, char **)
|
|
|
|
{
|
|
|
|
util::TAP::logger tap;
|
|
|
|
|
|
|
|
test_scoped<util::stream::scoped::flags> (tap);
|
|
|
|
|
|
|
|
return tap.status ();
|
|
|
|
}
|