From: asl Date: Wed, 14 Oct 2015 08:27:16 +0000 (+0300) Subject: correct random numbers generation X-Git-Tag: v1.5~132 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=eb96d4bbe84d0fdd43ebd9e098f6ba12df38bcb9;p=modules%2Fhydro.git correct random numbers generation --- diff --git a/src/HYDRO_tests/test_HYDROData_Bathymetry.cxx b/src/HYDRO_tests/test_HYDROData_Bathymetry.cxx index 45a8e256..479536ec 100644 --- a/src/HYDRO_tests/test_HYDROData_Bathymetry.cxx +++ b/src/HYDRO_tests/test_HYDROData_Bathymetry.cxx @@ -108,6 +108,7 @@ bool test_HYDROData_Bathymetry::createTestFile( const QString& theFileName ) generateOne( anOutStream, 1040.079834, -441.303467, 1017.623413, -459.9102175 ); generateOne( anOutStream, 1055.478516, -456.060547, 1034.946899, -475.9505 ); generateOne( anOutStream, 1074.085327, -474.025665, 1058.044922, -493.274017 ); + srand( time( 0 ) ); } aTmpFile.close(); diff --git a/src/HYDRO_tests/test_HYDROData_Main.cxx b/src/HYDRO_tests/test_HYDROData_Main.cxx index 7873bc29..66fcdafc 100644 --- a/src/HYDRO_tests/test_HYDROData_Main.cxx +++ b/src/HYDRO_tests/test_HYDROData_Main.cxx @@ -40,9 +40,12 @@ std::ostream& operator<<( std::ostream& theStream, const QColor& theColor ) theStream << "[" << theColor.red() << ", " << theColor.green() << ", " << theColor.blue() << "]"; return theStream; } +#include int main( int argc, char* argv[] ) { + srand( time( 0 ) ); + QApplication anApp( argc, argv ); SUIT_Session aSession;