From: asl Date: Thu, 16 Nov 2017 16:38:04 +0000 (+0300) Subject: debug of automatic tests X-Git-Tag: v2.1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=05e1c3eb48802e1defc3dc6935de7fa997f36652;p=modules%2Fhydro.git debug of automatic tests --- diff --git a/src/HYDRO_tests/TestViewer.cxx b/src/HYDRO_tests/TestViewer.cxx index 1da14b7e..51b61ce9 100644 --- a/src/HYDRO_tests/TestViewer.cxx +++ b/src/HYDRO_tests/TestViewer.cxx @@ -438,9 +438,17 @@ bool TestViewer::areScriptsEqual( const QString& theBaseName, QFile anExpected( anExpectedRefFilePath ); QFile anActual( anActualFilePath ); - if( !anExpected.open( QFile::ReadOnly | QFile::Text ) || - !anActual.open ( QFile::ReadOnly | QFile::Text ) ) + if( !anExpected.open( QFile::ReadOnly | QFile::Text ) ) + { + theMsg = "Expected file cannot be opened: " + anExpectedRefFilePath; + return false; + } + + if( !anActual.open( QFile::ReadOnly | QFile::Text ) ) + { + theMsg = "Actual file cannot be opened: " + anActualFilePath; return false; + } for( int i=0; iLocalPartition( aLC3, type9 ) ); QString aTmpFileName = "test.telemac"; +#ifdef WIN32 QString aTmpPath = QDir::tempPath() + "/" + aTmpFileName; +#else + QString aTmpPath = QDir::tempPath() + "/hydro/" + aTmpFileName; +#endif QString messStat; CPPUNIT_ASSERT_EQUAL( true, aMap->ExportTelemac( aTmpPath, 1E-4, aTable, messStat ) ); CPPUNIT_ASSERT_SCRIPTS_EQUAL( aTmpFileName, true, true, 0 );