mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
ts: refactor OpenCV tests
- removed tr1 usage (dropped in C++17) - moved includes of vector/map/iostream/limits into ts.hpp - require opencv_test + anonymous namespace (added compile check) - fixed norm() usage (must be from cvtest::norm for checks) and other conflict functions - added missing license headers
This commit is contained in:
@@ -41,8 +41,7 @@
|
||||
|
||||
#include "test_precomp.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
namespace opencv_test { namespace {
|
||||
|
||||
const string FEATURES2D_DIR = "features2d";
|
||||
const string IMAGE_FILENAME = "tsukuba.png";
|
||||
@@ -65,7 +64,9 @@ protected:
|
||||
virtual void run( int );
|
||||
void generateData( Mat& query, Mat& train );
|
||||
|
||||
void emptyDataTest();
|
||||
#if 0
|
||||
void emptyDataTest(); // FIXIT not used
|
||||
#endif
|
||||
void matchTest( const Mat& query, const Mat& train );
|
||||
void knnMatchTest( const Mat& query, const Mat& train );
|
||||
void radiusMatchTest( const Mat& query, const Mat& train );
|
||||
@@ -77,6 +78,7 @@ private:
|
||||
CV_DescriptorMatcherTest& operator=(const CV_DescriptorMatcherTest&) { return *this; }
|
||||
};
|
||||
|
||||
#if 0
|
||||
void CV_DescriptorMatcherTest::emptyDataTest()
|
||||
{
|
||||
assert( !dmatcher.empty() );
|
||||
@@ -156,6 +158,7 @@ void CV_DescriptorMatcherTest::emptyDataTest()
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
void CV_DescriptorMatcherTest::generateData( Mat& query, Mat& train )
|
||||
{
|
||||
@@ -554,3 +557,5 @@ TEST( Features2d_DMatch, read_write )
|
||||
String str = fs.releaseAndGetString();
|
||||
ASSERT_NE( strstr(str.c_str(), "4.5"), (char*)0 );
|
||||
}
|
||||
|
||||
}} // namespace
|
||||
|
||||
Reference in New Issue
Block a user