Salome HOME
debug of automatic tests
[modules/hydro.git] / src / HYDRO_tests / test_HYDROData_StricklerTable.cxx
index 46f0431496e0fa246b95cfb47814ccf9440f3e42..bfc5403733f7860e8485b7f23eb0b689e1539c0e 100644 (file)
@@ -29,6 +29,7 @@
 #include <QTableWidget>
 
 const QString DEF_STR_PATH = qgetenv( "HYDRO_ROOT_DIR" ) + "/share/salome/resources/hydro/def_strickler_table_06.txt";
+extern QString TMP_DIR;
 
 void test_HYDROData_StricklerTable::test_import()
 {
@@ -64,7 +65,7 @@ void test_HYDROData_StricklerTable::test_import_export_equivalence()
     Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
 
   CPPUNIT_ASSERT_EQUAL( true, aTable->Import( DEF_STR_PATH ) );
-  QString aTmpPath = QDir::tempPath() + "/stricker.txt";
+  QString aTmpPath = TMP_DIR + "/stricker.txt";
   CPPUNIT_ASSERT_EQUAL( true, aTable->Export( aTmpPath ) );
 
   QFile aRefFile( DEF_STR_PATH ), aTmpFile( aTmpPath );
@@ -210,11 +211,7 @@ void test_HYDROData_StricklerTable::test_dump_python()
   aTable->SetName( "ST" );
   CPPUNIT_ASSERT_EQUAL( true, aTable->Import( DEF_STR_PATH ) );
 
-#ifdef WIN32
-  QString aTmpPath = QDir::tempPath() + "/st_dump.py";
-#else
-  QString aTmpPath = QDir::tempPath() + "/hydro/st_dump.py";
-#endif
+  QString aTmpPath = TMP_DIR + "/st_dump.py";
 
   CPPUNIT_ASSERT_EQUAL( true, aDoc->DumpToPython( aTmpPath, false ) );