]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
correct random numbers generation
authorasl <asl@opencascade.com>
Wed, 14 Oct 2015 08:27:16 +0000 (11:27 +0300)
committerasl <asl@opencascade.com>
Wed, 14 Oct 2015 08:27:16 +0000 (11:27 +0300)
src/HYDRO_tests/test_HYDROData_Bathymetry.cxx
src/HYDRO_tests/test_HYDROData_Main.cxx

index 45a8e2563fcec7fce8dd0f0101201ec2b181e01b..479536ec69d3936c3ab3e240a40fd97761f240af 100644 (file)
@@ -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();
index 7873bc293c88c40f3fcfa1beff6236dde7d1ddc2..66fcdafc3fee9f735325afc6ae630f190ed154f7 100644 (file)
@@ -40,9 +40,12 @@ std::ostream& operator<<( std::ostream& theStream, const QColor& theColor )
   theStream << "[" << theColor.red() << ", " << theColor.green() << ", " << theColor.blue() << "]";
   return theStream;
 }
+#include <time.h>
 
 int main( int argc, char* argv[] )
 {
+  srand( time( 0 ) );
+
   QApplication anApp( argc, argv );
   SUIT_Session aSession;