Salome HOME
Correction for hydro_test
[modules/hydro.git] / src / HYDRO_tests / test_HYDROGUI_BathymetryPrs.cxx
index f2c32cbdd69837fa907cbb42beb15dcbbc0045e9..99c2ea2ed31680e5243801b6fd39d876a9e23c81 100644 (file)
@@ -60,12 +60,11 @@ void test_HYDROGUI_BathymetryPrs::updateColors()
   myBathPrs->UpdateWithColorScale( TestViewer::colorScale() );
 }
 
-
 void test_HYDROGUI_BathymetryPrs::test_presentation()
 {
-  TestViewer::eraseAll( true );
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
-  
+  TestViewer::eraseAll( true, true );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
+
   importTestBath( aDoc );
   TestViewer::showColorScale( false );
 
@@ -80,7 +79,7 @@ void test_HYDROGUI_BathymetryPrs::test_presentation()
   //QTest::qWait( 50000 );
 
   aDoc->Close();
-  TestViewer::eraseAll( true );
+  TestViewer::eraseAll( true, true );
 }
 
 void select( int x1, int y1, int x2, int y2 )
@@ -95,8 +94,8 @@ void select( int x1, int y1, int x2, int y2 )
 
 void test_HYDROGUI_BathymetryPrs::test_selection()
 {
-  TestViewer::eraseAll( true );
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  TestViewer::eraseAll( true, true );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   importTestBath( aDoc );
   TestViewer::showColorScale( false );
@@ -121,13 +120,13 @@ void test_HYDROGUI_BathymetryPrs::test_selection()
   //QTest::qWait( 50000 );
 
   aDoc->Close();
-  TestViewer::eraseAll( true );
+  TestViewer::eraseAll( true, true );
 }
 
 void test_HYDROGUI_BathymetryPrs::test_rescale_by_selection()
 {
-  TestViewer::eraseAll( true );
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  TestViewer::eraseAll( true, true );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   importTestBath( aDoc );
   TestViewer::showColorScale( false );
@@ -150,7 +149,7 @@ void test_HYDROGUI_BathymetryPrs::test_rescale_by_selection()
 
   double min, max;
   myBathPrs->GetRange( min, max );
-  CPPUNIT_ASSERT_DOUBLES_EQUAL( 177.78, min, EPS );
+  CPPUNIT_ASSERT_DOUBLES_EQUAL( 175.56, min, EPS );
   CPPUNIT_ASSERT_DOUBLES_EQUAL( 182.70, max, EPS );
 
   TestViewer::colorScale()->GetRange( min, max );
@@ -180,13 +179,13 @@ void test_HYDROGUI_BathymetryPrs::test_rescale_by_selection()
   //QTest::qWait( 50000 );
 
   aDoc->Close();
-  TestViewer::eraseAll( true );
+  TestViewer::eraseAll( true, true );
 }
 
 void test_HYDROGUI_BathymetryPrs::test_rescale_by_visible()
 {
-  TestViewer::eraseAll( true );
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  TestViewer::eraseAll( true, true );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   importTestBath( aDoc );
   TestViewer::showColorScale( false );
@@ -227,13 +226,13 @@ void test_HYDROGUI_BathymetryPrs::test_rescale_by_visible()
 
   //QTest::qWait( 50000 );
   aDoc->Close();
-  TestViewer::eraseAll( true );
+  TestViewer::eraseAll( true, true );
 }
 
 void test_HYDROGUI_BathymetryPrs::test_text_presentation()
 {
-  TestViewer::eraseAll( true );
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  TestViewer::eraseAll( true, true );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   importTestBath( aDoc );
   TestViewer::showColorScale( false );
@@ -278,13 +277,13 @@ void test_HYDROGUI_BathymetryPrs::test_text_presentation()
   //QTest::qWait( 50000 );
 
   aDoc->Close();
-  TestViewer::eraseAll( true );
+  TestViewer::eraseAll( true, true );
 }
 
 void test_HYDROGUI_BathymetryPrs::test_rescale_default()
 {
-  TestViewer::eraseAll( true );
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  TestViewer::eraseAll( true, true );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   importTestBath( aDoc );
   TestViewer::showColorScale( false );
@@ -335,13 +334,13 @@ void test_HYDROGUI_BathymetryPrs::test_rescale_default()
   //QTest::qWait( 50000 );
 
   aDoc->Close();
-  TestViewer::eraseAll( true );
+  TestViewer::eraseAll( true, true );
 }
 
 void test_HYDROGUI_BathymetryPrs::test_fit_on_selected()
 {
-  TestViewer::eraseAll( true );
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  TestViewer::eraseAll( true, true );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   importTestBath( aDoc );
   TestViewer::showColorScale( false );
@@ -365,5 +364,5 @@ void test_HYDROGUI_BathymetryPrs::test_fit_on_selected()
   //QTest::qWait( 50000 );
 
   aDoc->Close();
-  TestViewer::eraseAll( true );
+  TestViewer::eraseAll( true, true );
 }