From 1245cd175283b11800bbbdc52287957cc3d76417 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Thu, 30 Jul 2015 18:03:48 +0300 Subject: [PATCH] NearestNeighborTest: use ts->get_rng() instead of (implicit) theRNG() This ensures that test data is not dependent on the order the tests are executed in. --- modules/features2d/test/test_nearestneighbors.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/features2d/test/test_nearestneighbors.cpp b/modules/features2d/test/test_nearestneighbors.cpp index 8d1ecfd79a..c03a357065 100644 --- a/modules/features2d/test/test_nearestneighbors.cpp +++ b/modules/features2d/test/test_nearestneighbors.cpp @@ -125,7 +125,7 @@ int NearestNeighborTest::checkFind( const Mat& data ) void NearestNeighborTest::run( int /*start_from*/ ) { int code = cvtest::TS::OK, tempCode; Mat desc( featuresCount, dims, CV_32FC1 ); - randu( desc, Scalar(minValue), Scalar(maxValue) ); + ts->get_rng().fill( desc, RNG::UNIFORM, minValue, maxValue ); createModel( desc );