]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
HYDRO_tests errors correction
authorPaul RASCLE <paul.rascle@edf.fr>
Sun, 15 May 2016 14:31:17 +0000 (16:31 +0200)
committerPaul RASCLE <paul.rascle@edf.fr>
Sun, 15 May 2016 14:31:17 +0000 (16:31 +0200)
src/HYDRO_tests/TestViewer.cxx
src/HYDRO_tests/test_HYDROData_Bathymetry.cxx
src/HYDRO_tests/test_HYDROData_Main.cxx
src/HYDRO_tests/test_HYDROData_ShapeFile.cxx

index 52917a31a07c023cd60eae54b1c830e4956ed48d..d3e997c67f1aa4c09cd87700be9f9ed285e77a8b 100644 (file)
@@ -242,7 +242,7 @@ bool TestViewer::AssertImages( QString& theMessage )
 {
   QImage anActualImage = viewWindow()->dumpView();
 
-  QString anExpectedRefFilePath = qgetenv( "HYDRO_REFERENCE_DATA" );
+  QString anExpectedRefFilePath = qgetenv( "HYDRO_DIR" ) + "/../../src/HYDRO/src/HYDRO_tests/reference_data";
   anExpectedRefFilePath += "/" + myKey + ".png";
   QImage anExpectedRefImage; 
   anExpectedRefImage.load( anExpectedRefFilePath );
@@ -342,7 +342,7 @@ bool TestViewer::areScriptsEqual( const QString& theBaseName,
                                   int theLinesToOmit,
                                   QString& theMsg )
 {
-  QString anExpectedRefFilePath = qgetenv( "HYDRO_REFERENCE_DATA" );  
+  QString anExpectedRefFilePath = qgetenv( "HYDRO_DIR" ) + "/../../src/HYDRO/src/HYDRO_tests/reference_data";
   anExpectedRefFilePath += "/" + theBaseName;
   
   QString anActualFilePath = QDir::tempPath() + "/" + theBaseName;
index a4ccd3425cee6c40370bc7189db1da0890fa9947..4a25258fde76f1a87e9b76a2141ff9fade3a9af5 100644 (file)
@@ -131,28 +131,28 @@ void test_HYDROData_Bathymetry::testFileImport()
   CPPUNIT_ASSERT_EQUAL( 2300, anAltitudePoints.Length() );
 
   gp_XY aTestPoint( 1, 1 );
-  double anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
+  double anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint, 1 );
   CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.2432, anAltitude, EPS );
 
   aTestPoint = gp_XY( 0.5, 0.5 );
-  anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
-  CPPUNIT_ASSERT_DOUBLES_EQUAL( -0.3816, anAltitude, EPS );
+  anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint, 1 );
+  CPPUNIT_ASSERT_DOUBLES_EQUAL( -0.7127, anAltitude, EPS );
 
   aTestPoint = gp_XY( 1.5, 1 );
-  anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
+  anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint, 1 );
   CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.2432, anAltitude, EPS );
 
   aTestPoint = gp_XY( 1.5, 0.7 );
-  anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
-  CPPUNIT_ASSERT_DOUBLES_EQUAL(  -0.1608, anAltitude, EPS );
+  anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint, 1 );
+  CPPUNIT_ASSERT_DOUBLES_EQUAL(  -0.4116, anAltitude, EPS );
 
   aTestPoint = gp_XY( 1.5, -0.7 );
-  anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
-  CPPUNIT_ASSERT_DOUBLES_EQUAL( 5.0093, anAltitude, EPS );
+  anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint, 1 );
+  CPPUNIT_ASSERT_DOUBLES_EQUAL( -0.0479, anAltitude, EPS );
 
   aTestPoint = gp_XY( 2, 3.5 );
-  anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
-  CPPUNIT_ASSERT_DOUBLES_EQUAL( 12.6829, anAltitude, EPS );
+  anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint, 1 );
+  CPPUNIT_ASSERT_DOUBLES_EQUAL( 13.2525, anAltitude, EPS );
 
   aDoc->Close();
 }
index c4e3239eda879a707c2e43451807ec10bba78879..7382740c31ce9975aa9747a43fe9c7ca1349dc0c 100644 (file)
@@ -53,7 +53,7 @@ int main( int argc, char* argv[] )
   // Create the event manager and test controller
   CppUnit::TestResult controller;
 
-  // Add a listener that colllects test result
+  // Add a listener that collects test result
   CppUnit::TestResultCollector result;
   controller.addListener( &result );        
 
index 9df6c81365691cde75242c39c40a42f5fadf9b85..e9a878df755dacaa2c9fe4eb8b602876fa22854f 100644 (file)
@@ -21,7 +21,7 @@
 #include <QStringList>
 #include <vector>
 
-const QString REF_PATH = qgetenv( "HYDRO_REFERENCE_DATA" );
+const QString REF_PATH = qgetenv( "HYDRO_DIR" ) + "/../../src/HYDRO/src/HYDRO_tests/reference_data";
 
 bool test_HYDROData_ShapeFile::compare_two_files(const QString& File1, const QString& File2)
 {