Skip to content

Commit

Permalink
Boring changes - nonfree.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Donchenko committed Sep 5, 2013
1 parent 345bc63 commit de6a934
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions modules/nonfree/test/test_features2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ void CV_FeatureDetectorTest::regressionTest()

void CV_FeatureDetectorTest::run( int /*start_from*/ )
{
if( fdetector.empty() )
if( !fdetector )
{
ts->printf( cvtest::TS::LOG, "Feature detector is empty.\n" );
ts->set_failed_test_info( cvtest::TS::FAIL_INVALID_TEST_DATA );
Expand Down Expand Up @@ -464,7 +464,7 @@ class CV_DescriptorExtractorTest : public cvtest::BaseTest
void run(int)
{
createDescriptorExtractor();
if( dextractor.empty() )
if( !dextractor )
{
ts->printf(cvtest::TS::LOG, "Descriptor extractor is empty.\n");
ts->set_failed_test_info( cvtest::TS::FAIL_INVALID_TEST_DATA );
Expand Down Expand Up @@ -1101,7 +1101,7 @@ class CV_DetectPlanarTest : public cvtest::BaseTest
void run(int)
{
Ptr<Feature2D> f = Algorithm::create<Feature2D>("Feature2D." + fname);
if(f.empty())
if(!f)
return;
string path = string(ts->get_data_path()) + "detectors_descriptors_evaluation/planar/";
string imgname1 = path + "box.png";
Expand Down Expand Up @@ -1156,7 +1156,7 @@ class FeatureDetectorUsingMaskTest : public cvtest::BaseTest
FeatureDetectorUsingMaskTest(const Ptr<FeatureDetector>& featureDetector) :
featureDetector_(featureDetector)
{
CV_Assert(!featureDetector_.empty());
CV_Assert(featureDetector_);
}

protected:
Expand Down
2 changes: 1 addition & 1 deletion modules/nonfree/test/test_keypoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class CV_FeatureDetectorKeypointsTest : public cvtest::BaseTest
virtual void run(int)
{
cv::initModule_features2d();
CV_Assert(!detector.empty());
CV_Assert(detector);
string imgFilename = string(ts->get_data_path()) + FEATURES2D_DIR + "/" + IMAGE_FILENAME;

// Read the test image.
Expand Down
12 changes: 6 additions & 6 deletions modules/nonfree/test/test_rotation_and_scale_invariance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class DetectorRotationInvarianceTest : public cvtest::BaseTest
minKeyPointMatchesRatio(_minKeyPointMatchesRatio),
minAngleInliersRatio(_minAngleInliersRatio)
{
CV_Assert(!featureDetector.empty());
CV_Assert(featureDetector);
}

protected:
Expand Down Expand Up @@ -323,8 +323,8 @@ class DescriptorRotationInvarianceTest : public cvtest::BaseTest
normType(_normType),
minDescInliersRatio(_minDescInliersRatio)
{
CV_Assert(!featureDetector.empty());
CV_Assert(!descriptorExtractor.empty());
CV_Assert(featureDetector);
CV_Assert(descriptorExtractor);
}

protected:
Expand Down Expand Up @@ -410,7 +410,7 @@ class DetectorScaleInvarianceTest : public cvtest::BaseTest
minKeyPointMatchesRatio(_minKeyPointMatchesRatio),
minScaleInliersRatio(_minScaleInliersRatio)
{
CV_Assert(!featureDetector.empty());
CV_Assert(featureDetector);
}

protected:
Expand Down Expand Up @@ -530,8 +530,8 @@ class DescriptorScaleInvarianceTest : public cvtest::BaseTest
normType(_normType),
minDescInliersRatio(_minDescInliersRatio)
{
CV_Assert(!featureDetector.empty());
CV_Assert(!descriptorExtractor.empty());
CV_Assert(featureDetector);
CV_Assert(descriptorExtractor);
}

protected:
Expand Down

0 comments on commit de6a934

Please sign in to comment.