Skip to content

Commit

Permalink
unittest: Fix function QCHECK (issue #2517)
Browse files Browse the repository at this point in the history
The function must print an error message if the condition fails.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Jun 23, 2019
1 parent 111ef84 commit 252d80c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions unittest/log.h
Expand Up @@ -45,11 +45,11 @@ static inline std::ostream& LOG(enum LogLevel level)
// https://github.com/google/ion/blob/master/ion/base/logging.h
static inline std::ostream& QCHECK(bool condition)
{
static std::ostream null_stream(nullptr);
if (condition) {
return std::cout;
static std::ostream null_stream(nullptr);
return null_stream;
}
return null_stream;
return std::cout;
}

#endif // TESSERACT_UNITTEST_LOG_H_

0 comments on commit 252d80c

Please sign in to comment.