mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +04:00
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -180,12 +180,21 @@ using testing::tuple_size;
|
||||
using testing::tuple_element;
|
||||
|
||||
|
||||
class SkipTestException: public cv::Exception
|
||||
namespace details {
|
||||
class SkipTestExceptionBase: public cv::Exception
|
||||
{
|
||||
public:
|
||||
SkipTestExceptionBase(bool handlingTags);
|
||||
SkipTestExceptionBase(const cv::String& message, bool handlingTags);
|
||||
};
|
||||
}
|
||||
|
||||
class SkipTestException: public details::SkipTestExceptionBase
|
||||
{
|
||||
public:
|
||||
int dummy; // workaround for MacOSX Xcode 7.3 bug (don't make class "empty")
|
||||
SkipTestException() : dummy(0) {}
|
||||
SkipTestException(const cv::String& message) : dummy(0) { this->msg = message; }
|
||||
SkipTestException() : details::SkipTestExceptionBase(false), dummy(0) {}
|
||||
SkipTestException(const cv::String& message) : details::SkipTestExceptionBase(message, false), dummy(0) { }
|
||||
};
|
||||
|
||||
/** Apply tag to the current test
|
||||
|
||||
@@ -16,6 +16,9 @@ extern int testThreads;
|
||||
|
||||
void testSetUp();
|
||||
void testTearDown();
|
||||
|
||||
bool checkBigDataTests();
|
||||
|
||||
}
|
||||
|
||||
// check for required "opencv_test" namespace
|
||||
@@ -37,7 +40,7 @@ void testTearDown();
|
||||
Body(); \
|
||||
CV__TEST_CLEANUP \
|
||||
} \
|
||||
catch (const cvtest::SkipTestException& e) \
|
||||
catch (const cvtest::details::SkipTestExceptionBase& e) \
|
||||
{ \
|
||||
printf("[ SKIP ] %s\n", e.what()); \
|
||||
} \
|
||||
@@ -74,9 +77,8 @@ void testTearDown();
|
||||
|
||||
#define CV__TEST_BIGDATA_BODY_IMPL(name) \
|
||||
{ \
|
||||
if (!cvtest::runBigDataTests) \
|
||||
if (!cvtest::checkBigDataTests()) \
|
||||
{ \
|
||||
printf("[ SKIP ] BigData tests are disabled\n"); \
|
||||
return; \
|
||||
} \
|
||||
CV__TRACE_APP_FUNCTION_NAME(name); \
|
||||
@@ -85,7 +87,7 @@ void testTearDown();
|
||||
Body(); \
|
||||
CV__TEST_CLEANUP \
|
||||
} \
|
||||
catch (const cvtest::SkipTestException& e) \
|
||||
catch (const cvtest::details::SkipTestExceptionBase& e) \
|
||||
{ \
|
||||
printf("[ SKIP ] %s\n", e.what()); \
|
||||
} \
|
||||
|
||||
@@ -386,7 +386,7 @@ public:
|
||||
static enum PERF_STRATEGY getCurrentModulePerformanceStrategy();
|
||||
static enum PERF_STRATEGY setModulePerformanceStrategy(enum PERF_STRATEGY strategy);
|
||||
|
||||
class PerfSkipTestException: public cv::Exception
|
||||
class PerfSkipTestException: public cvtest::SkipTestException
|
||||
{
|
||||
public:
|
||||
int dummy; // workaround for MacOSX Xcode 7.3 bug (don't make class "empty")
|
||||
@@ -531,7 +531,7 @@ void PrintTo(const Size& sz, ::std::ostream* os);
|
||||
::cvtest::testSetUp(); \
|
||||
RunPerfTestBody(); \
|
||||
} \
|
||||
catch (cvtest::SkipTestException& e) \
|
||||
catch (cvtest::details::SkipTestExceptionBase& e) \
|
||||
{ \
|
||||
printf("[ SKIP ] %s\n", e.what()); \
|
||||
} \
|
||||
|
||||
Reference in New Issue
Block a user