diff --git a/Subtrees/beast/modules/beast_core/diagnostic/beast_UnitTest.cpp b/Subtrees/beast/modules/beast_core/diagnostic/beast_UnitTest.cpp index 8905ed2a12..0a5241dd1d 100644 --- a/Subtrees/beast/modules/beast_core/diagnostic/beast_UnitTest.cpp +++ b/Subtrees/beast/modules/beast_core/diagnostic/beast_UnitTest.cpp @@ -72,12 +72,26 @@ void UnitTest::beginTest (const String& testName) m_runner->beginNewTest (this, testName); } +void UnitTest::pass () +{ + m_runner->addPass(); +} + +void UnitTest::fail (String const& failureMessage) +{ + m_runner->addFail (failureMessage); +} + void UnitTest::expect (const bool result, const String& failureMessage) { if (result) - m_runner->addPass(); + { + pass (); + } else - m_runner->addFail (failureMessage); + { + fail (failureMessage); + } } //============================================================================== diff --git a/Subtrees/beast/modules/beast_core/diagnostic/beast_UnitTest.h b/Subtrees/beast/modules/beast_core/diagnostic/beast_UnitTest.h index f7e8466c18..bb300b3649 100644 --- a/Subtrees/beast/modules/beast_core/diagnostic/beast_UnitTest.h +++ b/Subtrees/beast/modules/beast_core/diagnostic/beast_UnitTest.h @@ -136,6 +136,14 @@ public: */ void beginTest (const String& testName); + /** Passes a test. + */ + void pass (); + + /** Fails a test with the specified message. + */ + void fail (String const& failureMessage); + //============================================================================== /** Checks that the result of a test is true, and logs this result.