Check ostream modifier correctly

This commit is contained in:
Nik Bougalis
2017-02-24 13:24:54 -05:00
committed by Vinnie Falco
parent 4fa0bf645b
commit 787b7c2158
4 changed files with 2 additions and 6 deletions
+1
View File
@@ -2,6 +2,7 @@
* Fix compilation error in non-template class
* Document type-pun in buffer_cat
* Correctly check ostream modifier (/extras)
HTTP
+1 -1
View File
@@ -111,7 +111,7 @@ public:
: std::basic_ostream<CharT, Traits>(&buf_)
, buf_(os)
{
if(os.flags() && std::ios::unitbuf)
if(os.flags() & std::ios::unitbuf)
std::unitbuf(*this);
}
};
-1
View File
@@ -283,7 +283,6 @@ reporter<_>::
on_log(std::string const& s)
{
os_ << s;
os_.flush();
}
} // detail
-4
View File
@@ -352,10 +352,7 @@ public:
{
auto const& name = ss_.str();
if(! name.empty())
{
suite_.log.flush();
suite_.runner_->testcase(name);
}
}
scoped_testcase(suite& self, std::stringstream& ss)
@@ -394,7 +391,6 @@ suite::testcase_t::operator()(
std::string const& name, abort_t abort)
{
suite_.abort_ = abort == abort_on_fail;
suite_.log.flush();
suite_.runner_->testcase(name);
}