From 89a507ffd4e41ee5f270034b8ad783963afd0be4 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 25 Jul 2011 17:41:37 +0300 Subject: [PATCH] Add a method to manually fail a test --- source/test.cpp | 5 +++++ source/test.h | 1 + 2 files changed, 6 insertions(+) diff --git a/source/test.cpp b/source/test.cpp index ab6e052..a05349b 100644 --- a/source/test.cpp +++ b/source/test.cpp @@ -152,6 +152,11 @@ void Test::debug(const string &str) detail_debug += format("%s\n", str); } +void Test::fail(const string &why) +{ + throw test_failed(why); +} + Test::Factory::Factory() { diff --git a/source/test.h b/source/test.h index ae459f5..d410377 100644 --- a/source/test.h +++ b/source/test.h @@ -83,6 +83,7 @@ protected: void info(const std::string &); void debug(const std::string &); + void fail(const std::string &); }; template -- 2.43.0