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 cv;
|
||||
using namespace std;
|
||||
namespace opencv_test {
|
||||
|
||||
CV_AMLTest::CV_AMLTest( const char* _modelName ) : CV_MLBaseTest( _modelName )
|
||||
{
|
||||
@@ -125,6 +124,8 @@ int CV_AMLTest::validate_test_results( int testCaseIdx )
|
||||
return cvtest::TS::OK;
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
TEST(ML_DTree, regression) { CV_AMLTest test( CV_DTREE ); test.safe_run(); }
|
||||
TEST(ML_Boost, regression) { CV_AMLTest test( CV_BOOST ); test.safe_run(); }
|
||||
TEST(ML_RTrees, regression) { CV_AMLTest test( CV_RTREES ); test.safe_run(); }
|
||||
@@ -219,4 +220,5 @@ TEST(ML_RTrees, getVotes)
|
||||
EXPECT_EQ(result.at<float>(0, predicted_class), rt->predict(test));
|
||||
}
|
||||
|
||||
}} // namespace
|
||||
/* End of file. */
|
||||
|
||||
Reference in New Issue
Block a user