From 66e4aead97e3692d85fdb34909f2a8441a71c110 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Mon, 30 Sep 2013 16:07:50 +0400 Subject: [PATCH] perf tests: added SANITY_CHECK_NOTHING() --- modules/ts/include/opencv2/ts/ts_perf.hpp | 4 +++- modules/ts/src/ts_perf.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/ts/include/opencv2/ts/ts_perf.hpp b/modules/ts/include/opencv2/ts/ts_perf.hpp index fa88dad..70ad571 100644 --- a/modules/ts/include/opencv2/ts/ts_perf.hpp +++ b/modules/ts/include/opencv2/ts/ts_perf.hpp @@ -209,6 +209,7 @@ private: #define SANITY_CHECK(array, ...) ::perf::Regression::add(this, #array, array , ## __VA_ARGS__) #define SANITY_CHECK_KEYPOINTS(array, ...) ::perf::Regression::addKeypoints(this, #array, array , ## __VA_ARGS__) #define SANITY_CHECK_MATCHES(array, ...) ::perf::Regression::addMatches(this, #array, array , ## __VA_ARGS__) +#define SANITY_CHECK_NOTHING() this->setVerified(); class CV_EXPORTS GpuPerf { @@ -345,12 +346,13 @@ private: friend class TestBase; }; friend class _declareHelper; - friend class Regression; bool verified; public: _declareHelper declare; + + void setVerified() { this->verified = true; } }; template class TestBaseWithParam: public TestBase, public ::testing::WithParamInterface {}; diff --git a/modules/ts/src/ts_perf.cpp b/modules/ts/src/ts_perf.cpp index dc7f453..7adc246 100644 --- a/modules/ts/src/ts_perf.cpp +++ b/modules/ts/src/ts_perf.cpp @@ -107,7 +107,7 @@ Regression& Regression::instance() Regression& Regression::add(TestBase* test, const std::string& name, cv::InputArray array, double eps, ERROR_TYPE err) { - if(test) test->verified = true; + if(test) test->setVerified(); return instance()(name, array, eps, err); } -- 2.7.4