From 05e1c3eb48802e1defc3dc6935de7fa997f36652 Mon Sep 17 00:00:00 2001 From: asl Date: Thu, 16 Nov 2017 19:38:04 +0300 Subject: [PATCH] debug of automatic tests --- src/HYDRO_tests/TestViewer.cxx | 12 ++++++++++-- src/HYDRO_tests/test_HYDROData_LandCoverMap.cxx | 4 ++++ 2 files changed, 14 insertions(+), 2 deletions(-) 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 ); -- 2.39.2