From 1e5125015eed73ac1891b5b676a3a400ff816955 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Thu, 11 Jan 2018 10:33:57 +0200 Subject: [PATCH] Add convenience functions to TestConnections --- maxscale-system-test/testconnections.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/maxscale-system-test/testconnections.h b/maxscale-system-test/testconnections.h index 91dbeaacc..fdd195f8a 100644 --- a/maxscale-system-test/testconnections.h +++ b/maxscale-system-test/testconnections.h @@ -52,6 +52,26 @@ public: ~TestConnections(); + /** + * @brief Is the test still ok? + * + * @return True, if no errors have occurred, false otherwise. + */ + bool ok() const + { + return global_result == 0; + } + + /** + * @brief Has the test failed? + * + * @return True, if errors have occurred, false otherwise. + */ + bool failed() const + { + return global_result != 0; + } + /** * @brief global_result Result of test, 0 if PASSED */