From: asl Date: Wed, 15 Nov 2017 14:25:15 +0000 (+0300) Subject: refs #1341: debug of automatic tests X-Git-Tag: v2.1~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d3b5be21469d84b315ac0428753244ddb6c995a3;p=modules%2Fhydro.git refs #1341: debug of automatic tests --- diff --git a/src/HYDRO_tests/reference_data/linux/merge_faces_boxes_23.png b/src/HYDRO_tests/reference_data/linux/merge_faces_boxes_23.png index 2bca4889..6cbef462 100644 Binary files a/src/HYDRO_tests/reference_data/linux/merge_faces_boxes_23.png and b/src/HYDRO_tests/reference_data/linux/merge_faces_boxes_23.png differ diff --git a/src/HYDRO_tests/reference_data/linux/merge_faces_boxes_24.png b/src/HYDRO_tests/reference_data/linux/merge_faces_boxes_24.png index 9187ce5f..ee6c532c 100644 Binary files a/src/HYDRO_tests/reference_data/linux/merge_faces_boxes_24.png and b/src/HYDRO_tests/reference_data/linux/merge_faces_boxes_24.png differ diff --git a/src/HYDRO_tests/reference_data/linux/merge_faces_circles_22.png b/src/HYDRO_tests/reference_data/linux/merge_faces_circles_22.png index 4abe17aa..21888992 100644 Binary files a/src/HYDRO_tests/reference_data/linux/merge_faces_circles_22.png and b/src/HYDRO_tests/reference_data/linux/merge_faces_circles_22.png differ diff --git a/src/HYDRO_tests/reference_data/linux/merge_faces_circles_23.png b/src/HYDRO_tests/reference_data/linux/merge_faces_circles_23.png index 58fffafb..361057cd 100644 Binary files a/src/HYDRO_tests/reference_data/linux/merge_faces_circles_23.png and b/src/HYDRO_tests/reference_data/linux/merge_faces_circles_23.png differ diff --git a/src/HYDRO_tests/reference_data/linux/merge_faces_circles_24.png b/src/HYDRO_tests/reference_data/linux/merge_faces_circles_24.png index 58fffafb..361057cd 100644 Binary files a/src/HYDRO_tests/reference_data/linux/merge_faces_circles_24.png and b/src/HYDRO_tests/reference_data/linux/merge_faces_circles_24.png differ diff --git a/src/HYDRO_tests/reference_data/linux/overview_drag.png b/src/HYDRO_tests/reference_data/linux/overview_drag.png index c8c24167..8c92e579 100644 Binary files a/src/HYDRO_tests/reference_data/linux/overview_drag.png and b/src/HYDRO_tests/reference_data/linux/overview_drag.png differ diff --git a/src/HYDRO_tests/reference_data/linux/overview_empty.png b/src/HYDRO_tests/reference_data/linux/overview_empty.png index d650ce30..5acc2b6b 100644 Binary files a/src/HYDRO_tests/reference_data/linux/overview_empty.png and b/src/HYDRO_tests/reference_data/linux/overview_empty.png differ diff --git a/src/HYDRO_tests/reference_data/linux/overview_panned_1.png b/src/HYDRO_tests/reference_data/linux/overview_panned_1.png index 4027bede..260de86c 100644 Binary files a/src/HYDRO_tests/reference_data/linux/overview_panned_1.png and b/src/HYDRO_tests/reference_data/linux/overview_panned_1.png differ diff --git a/src/HYDRO_tests/reference_data/linux/overview_prs.png b/src/HYDRO_tests/reference_data/linux/overview_prs.png index c989e7d0..b6d49e03 100644 Binary files a/src/HYDRO_tests/reference_data/linux/overview_prs.png and b/src/HYDRO_tests/reference_data/linux/overview_prs.png differ diff --git a/src/HYDRO_tests/reference_data/linux/overview_rotated_1.png b/src/HYDRO_tests/reference_data/linux/overview_rotated_1.png index b28710f0..17f5401d 100644 Binary files a/src/HYDRO_tests/reference_data/linux/overview_rotated_1.png and b/src/HYDRO_tests/reference_data/linux/overview_rotated_1.png differ diff --git a/src/HYDRO_tests/reference_data/linux/overview_selection.png b/src/HYDRO_tests/reference_data/linux/overview_selection.png index 14cffa31..4dcec63a 100644 Binary files a/src/HYDRO_tests/reference_data/linux/overview_selection.png and b/src/HYDRO_tests/reference_data/linux/overview_selection.png differ diff --git a/src/HYDRO_tests/reference_data/linux/overview_selection_a.png b/src/HYDRO_tests/reference_data/linux/overview_selection_a.png index dbecfe4e..f02fc39e 100644 Binary files a/src/HYDRO_tests/reference_data/linux/overview_selection_a.png and b/src/HYDRO_tests/reference_data/linux/overview_selection_a.png differ diff --git a/src/HYDRO_tests/reference_data/linux/overview_zoomed_1.png b/src/HYDRO_tests/reference_data/linux/overview_zoomed_1.png index da9ec2b5..0cd59c2a 100644 Binary files a/src/HYDRO_tests/reference_data/linux/overview_zoomed_1.png and b/src/HYDRO_tests/reference_data/linux/overview_zoomed_1.png differ diff --git a/src/HYDRO_tests/reference_data/linux/overview_zoomed_2.png b/src/HYDRO_tests/reference_data/linux/overview_zoomed_2.png index 712d335e..086299fc 100644 Binary files a/src/HYDRO_tests/reference_data/linux/overview_zoomed_2.png and b/src/HYDRO_tests/reference_data/linux/overview_zoomed_2.png differ diff --git a/src/HYDRO_tests/test_HYDROData_Main.cxx b/src/HYDRO_tests/test_HYDROData_Main.cxx index a3c68444..3c41a032 100644 --- a/src/HYDRO_tests/test_HYDROData_Main.cxx +++ b/src/HYDRO_tests/test_HYDROData_Main.cxx @@ -39,6 +39,7 @@ QString REF_DATA_PATH = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test/HYDRO"; QString REF_DATA_PATH = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test/HYDRO/HYDRO"; #endif +int MAIN_W = 800, MAIN_H = 600; int main( int argc, char* argv[] ) { @@ -48,14 +49,13 @@ int main( int argc, char* argv[] ) OCCViewer_ViewFrame* aWindow = TestViewer::viewWindow(); - int W = 800, H = 600; - aWindow->setGeometry( 200, 200, W, H ); + aWindow->setGeometry( 400, 100, MAIN_W, MAIN_H ); aWindow->show(); QTest::qWaitForWindowExposed( aWindow ); int dy = 34; //std::cout << dx << "," << dy << std::endl; - aWindow->resize( W, H+dy ); + aWindow->resize( MAIN_W, MAIN_H+dy ); anApp.processEvents(); std::string testPath = (argc > 1) ? std::string(argv[1]) : ""; diff --git a/src/HYDRO_tests/test_Overview.cxx b/src/HYDRO_tests/test_Overview.cxx index 4fef7e21..a83af23d 100644 --- a/src/HYDRO_tests/test_Overview.cxx +++ b/src/HYDRO_tests/test_Overview.cxx @@ -91,6 +91,8 @@ QImage test_Overview::dumpViews() return res; } +extern int MAIN_W, MAIN_H; + void test_Overview::create() { TestViewer::eraseAll( true, true ); @@ -109,7 +111,7 @@ void test_Overview::create() isCreated = true; } myOverview->setMainView( TestViewer::viewWindow() ); - TestViewer::viewWindow()->setGeometry( 400, 100, 800, 800 ); + //TestViewer::viewWindow()->setGeometry( 400, 100, MAIN_W, MAIN_H ); TestViewer::viewWindow()->onTopView(); myOverview->setGeometry( 100, 100, 200, 200 ); } @@ -181,14 +183,14 @@ void test_Overview::test_actions_in_main() CPPUNIT_ASSERT_OVERVIEW( "overview_selection" ); // 2. mouse wheel zoom - QWheelEvent we( QPoint( 243, 416 ), 120*20, Qt::NoButton, Qt::NoModifier ); + QWheelEvent we( QPoint( 243, 316 ), 120*20, Qt::NoButton, Qt::NoModifier ); qApp->sendEvent( vp, &we ); qApp->processEvents(); CPPUNIT_ASSERT_OVERVIEW( "overview_zoomed_1" ); // 3. zoom via mouse const int d = 100; - vp->zoom( 243, 416, 243+d, 416+d ); + vp->zoom( 243, 316, 243+d, 316+d ); CPPUNIT_ASSERT_OVERVIEW( "overview_zoomed_2" ); // 4. panning via mouse @@ -248,7 +250,7 @@ void test_Overview::test_actions_in_overview() TestViewer::context()->Select( Standard_True ); qApp->processEvents(); - QWheelEvent we( QPoint( 243, 416 ), 120*20, Qt::NoButton, Qt::NoModifier ); + QWheelEvent we( QPoint( 243, 316 ), 120*20, Qt::NoButton, Qt::NoModifier ); qApp->sendEvent( vp, &we ); qApp->processEvents(); CPPUNIT_ASSERT_OVERVIEW( "overview_zoomed_1" );