Salome HOME
Initial merge of branch 'BR_HYDRO_IMPS_2016' into BR_PORTING_OCCT_7
[modules/hydro.git] / src / HYDRO_tests / test_HYDROData_DTM.cxx
index 2050a73bc93a2a5e4e0a1f20b3e09825fd450c17..0436c8fb693e0e48607636206ef0a19932b8fbb3 100644 (file)
@@ -30,7 +30,7 @@
 #include <AIS_InteractiveContext.hxx>
 #include <AIS_PointCloud.hxx>
 #include <HYDROGUI_ShapeBathymetry.h>
-#include <Aspect_ColorScale.hxx>
+#include <AIS_ColorScale.hxx>
 #include <QGraphicsItem>
 #include <QGraphicsScene>
 #include <QGraphicsView>
@@ -553,8 +553,9 @@ void test_HYDROData_DTM::test_presentation()
   HYDROGUI_ShapeBathymetry* aBathPrs = new HYDROGUI_ShapeBathymetry( 0, aContext, DTM );
   aBathPrs->update( true, false );
 
+  bool ColorScaleIsDisp = TestViewer::ColorScaleIsDisplayed();
   TestViewer::showColorScale( true );
-  Handle_Aspect_ColorScale aCS = TestViewer::colorScale();
+  Handle(AIS_ColorScale) aCS = TestViewer::colorScale();
   aCS->SetMin( 0.0 );
   aCS->SetMax( 5.0 );
   aCS->SetNumberOfIntervals( 10 );
@@ -563,6 +564,7 @@ void test_HYDROData_DTM::test_presentation()
   QImage aDTMPrs = draw_DTM( aBathPrs, 0.5, 600, 600 );
   CPPUNIT_ASSERT_IMAGES2( &aDTMPrs, "DTM_1" );
   delete aBathPrs;
+  TestViewer::showColorScale( ColorScaleIsDisp );
 
   aDoc->Close();
 }
@@ -590,8 +592,6 @@ void test_HYDROData_DTM::test_garonne()
 
   CPPUNIT_ASSERT_EQUAL( 11, (int)profiles.Size() );
 
-
-
   Handle(HYDROData_DTM) DTM = Handle(HYDROData_DTM)::DownCast( aDoc->CreateObject( KIND_DTM ) );
   DTM->SetProfiles( profiles );
   DTM->SetDDZ( 0.1 );
@@ -600,14 +600,16 @@ void test_HYDROData_DTM::test_garonne()
   CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0, DTM->GetSpatialStep(), EPS );
   DTM->Update();
   
-  CPPUNIT_ASSERT_EQUAL( 275690, (int)DTM->GetAltitudePoints().size() ); 
-
+  CPPUNIT_ASSERT_EQUAL( 282338, (int)DTM->GetAltitudePoints().size() ); 
+  
   Handle_AIS_InteractiveContext aContext = TestViewer::context();
   HYDROGUI_ShapeBathymetry* aBathPrs = new HYDROGUI_ShapeBathymetry( 0, aContext, DTM );
   aBathPrs->update( true, false );
+  
+  bool ColorScaleIsDisp = TestViewer::ColorScaleIsDisplayed();
 
   TestViewer::showColorScale( true );
-  Handle_Aspect_ColorScale aCS = TestViewer::colorScale();
+  Handle(AIS_ColorScale) aCS = TestViewer::colorScale();
   aCS->SetMin( 0.0 );
   aCS->SetMax( 25.0 );
   aCS->SetNumberOfIntervals( 30 );
@@ -615,7 +617,8 @@ void test_HYDROData_DTM::test_garonne()
   
   QImage aDTMPrs = draw_DTM( aBathPrs, 0.5, 600, 600 );
   CPPUNIT_ASSERT_IMAGES2( &aDTMPrs, "DTM_2" );
+  TestViewer::showColorScale( ColorScaleIsDisp );
   delete aBathPrs;
-
   aDoc->Close();
+
 }