1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Skip test cases in case of SkipTestException in SetUp

This commit is contained in:
Dmitry Kurtaev
2023-09-20 13:27:06 +03:00
parent 799bb0cd18
commit d78637102c
2 changed files with 32 additions and 0 deletions
+11
View File
@@ -930,4 +930,15 @@ TEST_F(TestFixtureSkip, NoBodyRun) {
FAIL() << "Unreachable code called";
}
// Expected that SkipTestException thrown in SetUp method should skip test but not fail
struct TestSetUpSkip: public ::testing::Test {
virtual void SetUp() CV_OVERRIDE {
throw SkipTestException("Skip test at SetUp");
}
};
TEST_F(TestSetUpSkip, NoBodyRun) {
FAIL() << "Unreachable code called";
}
}} // namespace