Go to the source code of this file.
|
#define | ASSERT_SUCCESS(x) ASSERT_EQ (asg::CheckHelper<decltype(x)>::successCode(), x) |
|
#define | EXPECT_SUCCESS(x) EXPECT_EQ (asg::CheckHelper<decltype(x)>::successCode(), x) |
|
#define | ASSERT_FAILURE(x) ASSERT_EQ (asg::CheckHelper<decltype(x)>::failureCode(), x) |
|
#define | EXPECT_FAILURE(x) EXPECT_EQ (asg::CheckHelper<decltype(x)>::failureCode(), x) |
|
#define | ASSERT_FAILURE_REGEX(x, regex) ASSERT_FAILURE(x) |
|
#define | EXPECT_FAILURE_REGEX(x, regex) EXPECT_FAILURE(x) |
|
#define | ASSERT_THROW_REGEX(x, regex) |
|
#define | EXPECT_THROW_REGEX(x, regex) |
|
#define | ASSERT_MATCH_REGEX(reg, str) ASSERT_PRED2 (::asg::detail::matchesRegex, reg, str) |
|
#define | EXPECT_MATCH_REGEX(reg, str) EXPECT_PRED2 (::asg::detail::matchesRegex, reg, str) |
|
#define | ATLAS_GOOGLE_TEST_MAIN |
|
◆ ASSERT_FAILURE
◆ ASSERT_FAILURE_REGEX
◆ ASSERT_MATCH_REGEX
◆ ASSERT_SUCCESS
◆ ASSERT_THROW_REGEX
#define ASSERT_THROW_REGEX |
( |
|
x, |
|
|
|
regex |
|
) |
| |
Value: { std::string internalTestMessage; try { \
x; internalTestMessage = std::string (
"expected statement ") + #
x " to throw, but it didn't"; \
internalTestMessage = std::string (
"expected statement ") + #
x " to throw message matching " + (
regex) +
", but actual message didn't match: " +
e.what(); \
} } catch (...) { \
internalTestMessage = std::string (
"statement ") + #
x " threw an exception that didn't derive from std::exception"; } \
if (!internalTestMessage.empty()) \
FAIL() << internalTestMessage; \
else SUCCEED(); }
Definition at line 83 of file Control/AthToolSupport/AsgTesting/AsgTesting/UnitTest.h.
◆ ATLAS_GOOGLE_TEST_MAIN
#define ATLAS_GOOGLE_TEST_MAIN |
◆ EXPECT_FAILURE
◆ EXPECT_FAILURE_REGEX
◆ EXPECT_MATCH_REGEX
◆ EXPECT_SUCCESS
◆ EXPECT_THROW_REGEX
#define EXPECT_THROW_REGEX |
( |
|
x, |
|
|
|
regex |
|
) |
| |
Value: { std::string internalTestMessage; try { \
x; internalTestMessage = std::string (
"expected statement ") + #
x " to throw, but it didn't"; \
internalTestMessage = std::string (
"expected statement ") + #
x " to throw message matching " + (
regex) +
", but actual message didn't match: " +
e.what(); \
} } catch (...) { \
internalTestMessage = std::string (
"statement ") + #
x " threw an exception that didn't derive from std::exception"; } \
if (!internalTestMessage.empty()) \
ADD_FAILURE() << internalTestMessage; \
else SUCCEED(); }
Definition at line 95 of file Control/AthToolSupport/AsgTesting/AsgTesting/UnitTest.h.