Dune Core Modules (unstable)
testsuite.hh
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
120 catch (...) //If we end up here, but we wanted to catch a specific Exception, we consider this failed, but if Exception is AnyExpection, we pass.
124 // If we end up here we didn't catch any exception. Thus, if this is on purpose, i.e. 'Exception= NoException', we return true.
220 announceCheckResult(throwPolicy_, "SUBTEST", subTest.name(), std::to_string(subTest.failedChecks_)+"/"+std::to_string(subTest.checks_) + " checks failed in this subtest.");
251 std::cout << composeMessage("TEST ", name(), std::to_string(failedChecks_)+"/"+std::to_string(checks_) + " checks failed in this test.") << std::endl;
284 static void announceCheckResult(bool throwException, std::string type, std::string name, std::string reason)
CollectorStream checkNoThrow(Expression &&expr, std::string name="")
Checks that the expression doesn't throw.
Definition: testsuite.hh:163
CollectorStream requireNoThrow(Expression &&expr, std::string name="")
Requires that the expression doesn't throw.
Definition: testsuite.hh:202
TestSuite(std::string name="", ThrowPolicy policy=ThrowOnRequired)
Create TestSuite.
Definition: testsuite.hh:58
void subTest(const TestSuite &subTest)
Collect data from a sub-TestSuite.
Definition: testsuite.hh:214
TestSuite(ThrowPolicy policy, std::string name="")
Create TestSuite.
Definition: testsuite.hh:45
CollectorStream require(bool condition, std::string name="")
Check a required condition.
Definition: testsuite.hh:95
CollectorStream check(bool condition, std::string name="")
Check condition.
Definition: testsuite.hh:74
CollectorStream checkThrow(Expression &&expr, std::string name="")
Checks that the expression throws.
Definition: testsuite.hh:144
CollectorStream requireThrow(Expression &&expr, std::string name="")
Requires that the expression throws.
Definition: testsuite.hh:183
bool report() const
Print a summary of this TestSuite.
Definition: testsuite.hh:248
A few common exception classes.
void message(const std::string &msg)
store string in internal message buffer
Definition: exceptions.cc:32
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Nov 21, 23:30, 2024)