|
|
@ -47,18 +47,6 @@ bool checkBigDataTests(); |
|
|
|
} \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
|
|
|
|
|
|
|
|
#define CV__TEST_SETUP_IMPL(parent_class) \ |
|
|
|
|
|
|
|
{ \
|
|
|
|
|
|
|
|
try { \
|
|
|
|
|
|
|
|
parent_class::SetUp(); \
|
|
|
|
|
|
|
|
} catch (const cvtest::details::SkipTestExceptionBase& e) { \
|
|
|
|
|
|
|
|
printf("[ SKIP ] %s\n", e.what()); \
|
|
|
|
|
|
|
|
} \
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct DummyTest : public ::testing::Test { |
|
|
|
|
|
|
|
virtual void TestBody() CV_OVERRIDE {} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#undef TEST |
|
|
|
#undef TEST |
|
|
|
#define TEST_(test_case_name, test_name, parent_class, bodyMethodName, BODY_ATTR, BODY_IMPL) \ |
|
|
|
#define TEST_(test_case_name, test_name, parent_class, bodyMethodName, BODY_ATTR, BODY_IMPL) \ |
|
|
@ -72,17 +60,6 @@ struct DummyTest : public ::testing::Test { |
|
|
|
GTEST_DISALLOW_COPY_AND_ASSIGN_(\
|
|
|
|
GTEST_DISALLOW_COPY_AND_ASSIGN_(\
|
|
|
|
GTEST_TEST_CLASS_NAME_(test_case_name, test_name));\
|
|
|
|
GTEST_TEST_CLASS_NAME_(test_case_name, test_name));\
|
|
|
|
};\
|
|
|
|
};\
|
|
|
|
class test_case_name##test_name##_factory : public ::testing::internal::TestFactoryBase { \
|
|
|
|
|
|
|
|
public:\
|
|
|
|
|
|
|
|
virtual ::testing::Test* CreateTest() { \
|
|
|
|
|
|
|
|
try { \
|
|
|
|
|
|
|
|
return new GTEST_TEST_CLASS_NAME_(test_case_name, test_name); \
|
|
|
|
|
|
|
|
} catch (const cvtest::details::SkipTestExceptionBase& e) { \
|
|
|
|
|
|
|
|
printf("[ SKIP ] %s\n", e.what()); \
|
|
|
|
|
|
|
|
return new DummyTest(); \
|
|
|
|
|
|
|
|
} \
|
|
|
|
|
|
|
|
} \
|
|
|
|
|
|
|
|
};\
|
|
|
|
|
|
|
|
\
|
|
|
|
\
|
|
|
|
::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_case_name, test_name)\
|
|
|
|
::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_case_name, test_name)\
|
|
|
|
::test_info_ =\
|
|
|
|
::test_info_ =\
|
|
|
@ -92,7 +69,8 @@ struct DummyTest : public ::testing::Test { |
|
|
|
(::testing::internal::GetTestTypeId()), \
|
|
|
|
(::testing::internal::GetTestTypeId()), \
|
|
|
|
parent_class::SetUpTestCase, \
|
|
|
|
parent_class::SetUpTestCase, \
|
|
|
|
parent_class::TearDownTestCase, \
|
|
|
|
parent_class::TearDownTestCase, \
|
|
|
|
new test_case_name##test_name##_factory);\
|
|
|
|
new ::testing::internal::TestFactoryImpl<\
|
|
|
|
|
|
|
|
GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\
|
|
|
|
void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody() BODY_IMPL( #test_case_name "_" #test_name ) \
|
|
|
|
void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody() BODY_IMPL( #test_case_name "_" #test_name ) \
|
|
|
|
void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::bodyMethodName() |
|
|
|
void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::bodyMethodName() |
|
|
|
|
|
|
|
|
|
|
@ -131,22 +109,10 @@ struct DummyTest : public ::testing::Test { |
|
|
|
private:\
|
|
|
|
private:\
|
|
|
|
virtual void TestBody() CV_OVERRIDE;\
|
|
|
|
virtual void TestBody() CV_OVERRIDE;\
|
|
|
|
virtual void Body(); \
|
|
|
|
virtual void Body(); \
|
|
|
|
virtual void SetUp() CV_OVERRIDE; \
|
|
|
|
|
|
|
|
static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_;\
|
|
|
|
static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_;\
|
|
|
|
GTEST_DISALLOW_COPY_AND_ASSIGN_(\
|
|
|
|
GTEST_DISALLOW_COPY_AND_ASSIGN_(\
|
|
|
|
GTEST_TEST_CLASS_NAME_(test_fixture, test_name));\
|
|
|
|
GTEST_TEST_CLASS_NAME_(test_fixture, test_name));\
|
|
|
|
};\
|
|
|
|
};\
|
|
|
|
class test_fixture##test_name##_factory : public ::testing::internal::TestFactoryBase { \
|
|
|
|
|
|
|
|
public:\
|
|
|
|
|
|
|
|
virtual ::testing::Test* CreateTest() { \
|
|
|
|
|
|
|
|
try { \
|
|
|
|
|
|
|
|
return new GTEST_TEST_CLASS_NAME_(test_fixture, test_name); \
|
|
|
|
|
|
|
|
} catch (const cvtest::details::SkipTestExceptionBase& e) { \
|
|
|
|
|
|
|
|
printf("[ SKIP ] %s\n", e.what()); \
|
|
|
|
|
|
|
|
return new DummyTest(); \
|
|
|
|
|
|
|
|
} \
|
|
|
|
|
|
|
|
} \
|
|
|
|
|
|
|
|
};\
|
|
|
|
|
|
|
|
\
|
|
|
|
\
|
|
|
|
::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_fixture, test_name)\
|
|
|
|
::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_fixture, test_name)\
|
|
|
|
::test_info_ =\
|
|
|
|
::test_info_ =\
|
|
|
@ -156,9 +122,9 @@ struct DummyTest : public ::testing::Test { |
|
|
|
(::testing::internal::GetTypeId<test_fixture>()), \
|
|
|
|
(::testing::internal::GetTypeId<test_fixture>()), \
|
|
|
|
test_fixture::SetUpTestCase, \
|
|
|
|
test_fixture::SetUpTestCase, \
|
|
|
|
test_fixture::TearDownTestCase, \
|
|
|
|
test_fixture::TearDownTestCase, \
|
|
|
|
new test_fixture##test_name##_factory);\
|
|
|
|
new ::testing::internal::TestFactoryImpl<\
|
|
|
|
|
|
|
|
GTEST_TEST_CLASS_NAME_(test_fixture, test_name)>);\
|
|
|
|
void GTEST_TEST_CLASS_NAME_(test_fixture, test_name)::TestBody() CV__TEST_BODY_IMPL( #test_fixture "_" #test_name ) \
|
|
|
|
void GTEST_TEST_CLASS_NAME_(test_fixture, test_name)::TestBody() CV__TEST_BODY_IMPL( #test_fixture "_" #test_name ) \
|
|
|
|
void GTEST_TEST_CLASS_NAME_(test_fixture, test_name)::SetUp() CV__TEST_SETUP_IMPL(test_fixture) \
|
|
|
|
|
|
|
|
void GTEST_TEST_CLASS_NAME_(test_fixture, test_name)::Body() |
|
|
|
void GTEST_TEST_CLASS_NAME_(test_fixture, test_name)::Body() |
|
|
|
|
|
|
|
|
|
|
|
// Don't use directly
|
|
|
|
// Don't use directly
|
|
|
|