From eb96d4bbe84d0fdd43ebd9e098f6ba12df38bcb9 Mon Sep 17 00:00:00 2001 From: asl Date: Wed, 14 Oct 2015 11:27:16 +0300 Subject: [PATCH] correct random numbers generation --- src/HYDRO_tests/test_HYDROData_Bathymetry.cxx | 1 + src/HYDRO_tests/test_HYDROData_Main.cxx | 3 +++ 2 files changed, 4 insertions(+) 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; -- 2.39.2