@@ -50,6 +50,9 @@ bool hasPanicked();
5050// / @brief indicates whether the test error handler registered any error
5151bool hasError ();
5252
53+ // / @brief indicates whether the test error handler registered a required condition violation
54+ bool hasRequiredConditionViolation ();
55+
5356// / @brief indicates whether the test error handler registered a precondition violation
5457bool hasPreconditionViolation ();
5558
@@ -120,11 +123,11 @@ inline void runInTestThread(Function&& testFunction, Args&&... args)
120123
121124#define IOX_TESTING_ASSERT_NO_ERROR () ASSERT_FALSE(iox::testing::hasError())
122125
123- #define IOX_TESTING_ASSERT_VIOLATION () \
124- ASSERT_TRUE (iox::testing::hasPreconditionViolation() || iox::testing::hasAssumptionViolation())
126+ #define IOX_TESTING_ASSERT_VIOLATION () ASSERT_TRUE(iox::testing::hasViolation())
127+
128+ #define IOX_TESTING_ASSERT_NO_VIOLATION () ASSERT_FALSE(iox::testing::hasViolation())
125129
126- #define IOX_TESTING_ASSERT_NO_VIOLATION () \
127- ASSERT_FALSE (iox::testing::hasPreconditionViolation() || iox::testing::hasAssumptionViolation())
130+ #define IOX_TESTING_ASSERT_REQUIRED_CONDITION_VIOLATION () ASSERT_TRUE(iox::testing::hasRequiredConditionViolation())
128131
129132#define IOX_TESTING_ASSERT_PRECONDITION_VIOLATION () ASSERT_TRUE(iox::testing::hasPreconditionViolation())
130133
@@ -142,11 +145,11 @@ inline void runInTestThread(Function&& testFunction, Args&&... args)
142145
143146#define IOX_TESTING_EXPECT_NO_ERROR () EXPECT_FALSE(iox::testing::hasError())
144147
145- #define IOX_TESTING_EXPECT_VIOLATION () \
146- EXPECT_TRUE (iox::testing::hasPreconditionViolation() || iox::testing::hasAssumptionViolation())
148+ #define IOX_TESTING_EXPECT_VIOLATION () EXPECT_TRUE(iox::testing::hasViolation())
149+
150+ #define IOX_TESTING_EXPECT_NO_VIOLATION () EXPECT_FALSE(iox::testing::hasViolation())
147151
148- #define IOX_TESTING_EXPECT_NO_VIOLATION () \
149- EXPECT_FALSE (iox::testing::hasPreconditionViolation() || iox::testing::hasAssumptionViolation())
152+ #define IOX_TESTING_EXPECT_REQUIRED_CONDITION_VIOLATION () EXPECT_TRUE(iox::testing::hasRequiredConditionViolation())
150153
151154#define IOX_TESTING_EXPECT_PRECONDITION_VIOLATION () EXPECT_TRUE(iox::testing::hasPreconditionViolation())
152155
0 commit comments