All tests writing temporary files are updated to use cv::tempfile() function

This commit is contained in:
Andrey Kamaev
2012-06-25 11:24:06 +00:00
parent ec3a7665b0
commit d9c74f63e1
26 changed files with 500 additions and 438 deletions

View File

@@ -128,7 +128,7 @@ void NearestNeighborTest::run( int /*start_from*/ ) {
randu( desc, Scalar(minValue), Scalar(maxValue) );
createModel( desc );
tempCode = checkGetPoins( desc );
if( tempCode != cvtest::TS::OK )
{
@@ -149,9 +149,9 @@ void NearestNeighborTest::run( int /*start_from*/ ) {
ts->printf( cvtest::TS::LOG, "bad accuracy of Find \n" );
code = tempCode;
}
releaseModel();
ts->set_failed_test_info( code );
}
@@ -398,7 +398,7 @@ void CV_FlannSavedIndexTest::createModel(const cv::Mat &data)
}
string filename = tempfile();
index->save( filename );
createIndex( data, SavedIndexParams(filename.c_str()));
remove( filename.c_str() );
}