Salome HOME
Disabling message_progress
[modules/hydro.git] / src / HYDRO_tests / test_HYDROData_Profile.cxx
index ee40097ffef461b39c7e7436083941421065fce5..d4ebe9853740cd8175c5969636fdf727ce53455d 100644 (file)
@@ -35,6 +35,7 @@
 
 const double EPS = 1E-2;
 extern QString REF_DATA_PATH;
+extern QString TMP_DIR;
 
 bool test_HYDROData_Profile::createTestFile( const QString& theFileName,
                                              const bool     theIsParametric )
@@ -79,10 +80,10 @@ bool test_HYDROData_Profile::createTestFile( const QString& theFileName,
 
 void test_HYDROData_Profile::testFileImport()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
-  QString aParamFileName = QDir::tempPath() + QDir::separator() + "parametric.pa";
-  QString aGeorefFileName = QDir::tempPath() + QDir::separator() + "georef.pa";
+  QString aParamFileName = TMP_DIR + QDir::separator() + "parametric.pa";
+  QString aGeorefFileName = TMP_DIR + QDir::separator() + "georef.pa";
   if ( !createTestFile( aParamFileName, true ) || !createTestFile( aGeorefFileName, false ) )
     return; // No file has been created
 
@@ -138,12 +139,12 @@ void test_HYDROData_Profile::testFileImport()
 
 void test_HYDROData_Profile::testCopy()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   
   Handle(HYDROData_Profile) aProfile1 = 
     Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) );
 
-  QString aFileName = QDir::tempPath() + QDir::separator() + "georef.pa";
+  QString aFileName = TMP_DIR + QDir::separator() + "georef.pa";
 
   bool anIsFileCreated = createTestFile( aFileName, false );
   
@@ -186,7 +187,7 @@ void test_HYDROData_Profile::testProjection()
 {
   std::string aPath = ( REF_DATA_PATH+"/profiles1.xyz" ).toStdString();
 
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   TCollection_AsciiString aFileName( aPath.c_str() );
   NCollection_Sequence<int> aBadProfilesList;