ts: move PARAM_TEST_CASE and GET_PARAM into ts.hpp

This commit is contained in:
Alexander Alekhin
2016-01-11 15:36:52 +03:00
parent ec466ed1e0
commit 43033f0b1d
3 changed files with 5 additions and 6 deletions

View File

@@ -35,6 +35,9 @@
# define GTEST_USES_POSIX_RE 0 # define GTEST_USES_POSIX_RE 0
#endif #endif
#define PARAM_TEST_CASE(name, ...) struct name : testing::TestWithParam< std::tr1::tuple< __VA_ARGS__ > >
#define GET_PARAM(k) std::tr1::get< k >(GetParam())
#include "opencv2/core.hpp" #include "opencv2/core.hpp"
#include "opencv2/core/utility.hpp" #include "opencv2/core/utility.hpp"

View File

@@ -208,9 +208,6 @@ namespace cvtest
} \ } \
void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::UnsafeTestBody() void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::UnsafeTestBody()
#define PARAM_TEST_CASE(name, ...) struct name : testing::TestWithParam< std::tr1::tuple< __VA_ARGS__ > >
#define GET_PARAM(k) std::tr1::get< k >(GetParam())
#define DIFFERENT_SIZES testing::Values(cv::Size(128, 128), cv::Size(113, 113)) #define DIFFERENT_SIZES testing::Values(cv::Size(128, 128), cv::Size(113, 113))
// Depth // Depth

View File

@@ -324,10 +324,9 @@ struct CV_EXPORTS TSTestWithParam : public TestUtils, public ::testing::TestWith
}; };
#undef PARAM_TEST_CASE
#define PARAM_TEST_CASE(name, ...) struct name : public TSTestWithParam< std::tr1::tuple< __VA_ARGS__ > > #define PARAM_TEST_CASE(name, ...) struct name : public TSTestWithParam< std::tr1::tuple< __VA_ARGS__ > >
#define GET_PARAM(k) std::tr1::get< k >(GetParam())
#ifndef IMPLEMENT_PARAM_CLASS #ifndef IMPLEMENT_PARAM_CLASS
#define IMPLEMENT_PARAM_CLASS(name, type) \ #define IMPLEMENT_PARAM_CLASS(name, type) \
class name \ class name \