]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
debug of tests [colorScale]
authorisn <isn@opencascade.com>
Mon, 28 Nov 2016 11:42:21 +0000 (14:42 +0300)
committerisn <isn@opencascade.com>
Mon, 28 Nov 2016 11:42:21 +0000 (14:42 +0300)
src/HYDRO_tests/TestViewer.cxx
src/HYDRO_tests/TestViewer.h
src/HYDRO_tests/test_HYDROData_DTM.cxx

index fce3baadf3643f100b23246b8d3b323bc88395bd..64155ea69743222e7e0838adb6bdb85f728a3beb 100644 (file)
@@ -346,6 +346,14 @@ void TestViewer::showColorScale( bool isShow )
   }
 }
 
+bool TestViewer::ColorScaleIsDisplayed()
+{
+  Handle(V3d_View) aView = myViewWindow->getViewPort()->getView();
+  if( aView.IsNull() )
+    return false;
+  return aView->ColorScaleIsDisplayed();
+}
+
 void TestViewer::select( int theViewX, int theViewY )
 {
   Handle(V3d_View) aView = myViewWindow->getViewPort()->getView();
index 7173bb2fc327682cc4c8399c40a91e1a5403097d..f3dea715d359b86b6de675aae5c6958809acbb46 100644 (file)
@@ -47,6 +47,7 @@ public:
 
   static Handle_Aspect_ColorScale colorScale();
   static void showColorScale( bool );
+  static bool ColorScaleIsDisplayed();
 
   static void select( int theViewX, int theViewY );
 
index 3a84e0bc8f86ad9f8e83cc288ad24c15f38dcea1..b3fd50f788cc73bad2d997489398b8938b7ff55e 100644 (file)
@@ -590,8 +590,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 );
@@ -601,10 +599,12 @@ void test_HYDROData_DTM::test_garonne()
   DTM->Update();
   
   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();
@@ -615,7 +615,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();
+
 }