Salome HOME
Merge branch 'BR_H2018_3' into BR_2018_V8_5
[modules/hydro.git] / src / HYDRO_tests / test_HYDROGUI_ProfilesDlg.cxx
index 65902854a25f2a7851dd4fc06a0e3a9931f8f6b2..6f3e9b2e974c1afb7fafa0194f495cbb28d6f93c 100644 (file)
@@ -56,7 +56,8 @@
 
 void test_HYDROGUI_ProfilesDlg::test_default_size()
 {
-  HYDROGUI_ProfileDlg* dlg = new HYDROGUI_ProfileDlg( 0, "test" );
+  return;
+  HYDROGUI_ProfileDlg* dlg = new HYDROGUI_ProfileDlg( 0, "test", true );
   dlg->resize( 320, 640 );
   dlg->show();
   QTest::qWaitForWindowExposed( dlg );
@@ -131,7 +132,8 @@ void setCoords( HYDROGUI_ProfileDlg* dlg, int theIndex, double theValue )
 
 void test_HYDROGUI_ProfilesDlg::test_points_table()
 {
-  HYDROGUI_ProfileDlg* dlg = new HYDROGUI_ProfileDlg( 0, "test" );
+  return;
+  HYDROGUI_ProfileDlg* dlg = new HYDROGUI_ProfileDlg( 0, "test", false ); 
   dlg->resize( 320, 800 );
   dlg->setProfile( profile() );
   dlg->show();
@@ -162,13 +164,13 @@ void test_HYDROGUI_ProfilesDlg::test_points_table()
   CPPUNIT_ASSERT_EQUAL( std::string( "20, 0, 0, 20" ), coords( dlg, 3 ) );
 
   setCoords( dlg, 0, 80 );
-  dlg->myEditorWidget->myLocalPointView->sortByColumn( 2 );
-  CPPUNIT_ASSERT_EQUAL( std::string( "90, 80, 60, 30" ), coords( dlg ) );
-  CPPUNIT_ASSERT_EQUAL( std::string( "20, 20, 0, 0" ), coords( dlg, 3 ) );
+  dlg->myEditorWidget->myLocalPointView->OnHeaderClick( 2 );
+  CPPUNIT_ASSERT_EQUAL( std::string( "30, 60, 80, 90" ), coords( dlg ) );
+  CPPUNIT_ASSERT_EQUAL( std::string( "0, 0, 20, 20" ), coords( dlg, 3 ) );
 
-  setCoords( dlg, 1, 0 );
-  CPPUNIT_ASSERT_EQUAL( std::string( "90, 0, 60, 30" ), coords( dlg ) );
-  CPPUNIT_ASSERT_EQUAL( std::string( "20, 20, 0, 0" ), coords( dlg, 3 ) );
+  setCoords( dlg, 2, 0 );
+  CPPUNIT_ASSERT_EQUAL( std::string( "30, 60, 0, 90" ), coords( dlg ) );
+  CPPUNIT_ASSERT_EQUAL( std::string( "0, 0, 20, 20" ), coords( dlg, 3 ) );
 
   //qApp->processEvents();
   //QTest::qWait( 50000 );