tap: check the status variable is read
This commit is contained in:
parent
0cf530c2de
commit
197160daba
10
tap.cpp
10
tap.cpp
@ -11,10 +11,11 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Copyright 2015-2017 Danny Robson <danny@nerdcruft.net>
|
||||
* Copyright 2015-2018 Danny Robson <danny@nerdcruft.net>
|
||||
*/
|
||||
|
||||
#include "tap.hpp"
|
||||
#include "debug.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@ -26,6 +27,8 @@ logger::logger ():
|
||||
logger (std::cout)
|
||||
{ ; }
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
logger::logger (std::ostream &_output):
|
||||
m_output (_output),
|
||||
m_status (EXIT_SUCCESS),
|
||||
@ -36,6 +39,7 @@ logger::logger (std::ostream &_output):
|
||||
//-----------------------------------------------------------------------------
|
||||
logger::~logger ()
|
||||
{
|
||||
CHECK_EQ (m_reported, m_status);
|
||||
std::cout << "1.." << m_size << '\n';
|
||||
}
|
||||
|
||||
@ -68,5 +72,9 @@ logger::noop (void)
|
||||
int
|
||||
logger::status (void) const
|
||||
{
|
||||
#if !defined(NDEBUG)
|
||||
m_reported = m_status;
|
||||
#endif
|
||||
|
||||
return m_status;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user