]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
debug of automatic tests
authorasl <asl@opencascade.com>
Fri, 22 Sep 2017 12:37:03 +0000 (15:37 +0300)
committerasl <asl@opencascade.com>
Fri, 22 Sep 2017 12:37:03 +0000 (15:37 +0300)
15 files changed:
src/HYDRO_tests/TestViewer.cxx
src/HYDRO_tests/reference_data/Channel.png
src/HYDRO_tests/reference_data/Extraction_Channel.png
src/HYDRO_tests/reference_data/Extraction_ImmZone.png
src/HYDRO_tests/reference_data/Merge_Polylines.png
src/HYDRO_tests/reference_data/Polyline_Presentation.png
src/HYDRO_tests/reference_data/Shape_preview_im_zone.png
src/HYDRO_tests/reference_data/Split_Polylines_Colors.png
src/HYDRO_tests/reference_data/Split_Straight.png
src/HYDRO_tests/reference_data/StreamDlg.png
src/HYDRO_tests/reference_data/cc_int_w_3.png
src/HYDRO_tests/reference_data/st_dump.py
src/HYDRO_tests/reference_data/stream_dtm_2d.png
src/HYDRO_tests/reference_data/stream_dtm_3d.png
src/HYDRO_tests/test_GraphicsView.cxx

index 5ef6d2d9529afa0b6042d491bb0535c1eebb8232..34763265665cdaee38bf4541853555016aa561cb 100644 (file)
@@ -274,6 +274,14 @@ bool TestViewer::AssertImages( QString& theMessage, const QImage* theImage, cons
   else
     anActualImage = viewWindow()->dumpView();
 
+  const bool SWAP_RGB_ORDER = true;
+  if( SWAP_RGB_ORDER )
+  {
+    // A temporary patch for bug in SALOME/OCC dump; the result image contains swapped RGB colors
+    anActualImage = anActualImage.rgbSwapped();
+  }
+
+
   if( theCase )
     myKey = theCase;
 
index 369807de4473c18df94d41e40a5d5042f0aa0228..346d861b69bfc89ca423c6d55c06f3adc8dcaf02 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/Channel.png and b/src/HYDRO_tests/reference_data/Channel.png differ
index 9ef6188a053eadbe1d5122c28868cc276f66c49a..a9e5c6ab8c53264e8ced9654dd304dbb2f885297 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/Extraction_Channel.png and b/src/HYDRO_tests/reference_data/Extraction_Channel.png differ
index 9e9197879742bc966e5eecd8dff67ea01321a589..3d9a2790226e5196f1d9cfbafc873ea8fc71602a 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/Extraction_ImmZone.png and b/src/HYDRO_tests/reference_data/Extraction_ImmZone.png differ
index 46e68bed7cd2cd138acb0825ebcabb9563d6ba05..c90a95d5887a43bb751e4966c73ba005b4075274 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/Merge_Polylines.png and b/src/HYDRO_tests/reference_data/Merge_Polylines.png differ
index 1a4f14fdff8e0e089bbb72736205a6e533a3f08b..3fc630ed90df5f53f6ee4385ed56fd7734de1546 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/Polyline_Presentation.png and b/src/HYDRO_tests/reference_data/Polyline_Presentation.png differ
index fd1d1233d2898dada0cdce6f6fb6df15143a1209..c41a5666b919a91080925f42bf29d91ea2b5c5fe 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/Shape_preview_im_zone.png and b/src/HYDRO_tests/reference_data/Shape_preview_im_zone.png differ
index 1915908fe69d167401f085ac2e5d2e5dd886fb3c..b96b1d9319ee16d4da4c3029974a237842505029 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/Split_Polylines_Colors.png and b/src/HYDRO_tests/reference_data/Split_Polylines_Colors.png differ
index c93ac4692de956e0ac5eabd0ffc8b05d0dfe049e..89586780aacc32c3d30b99a548b6746f3b766036 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/Split_Straight.png and b/src/HYDRO_tests/reference_data/Split_Straight.png differ
index 69df6a0aec371d5cdcb78180fc3c4b6d5c00e13a..a8c3a6b4a5cafe5f4269006552db0e1601fc037f 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/StreamDlg.png and b/src/HYDRO_tests/reference_data/StreamDlg.png differ
index 53d94fec358b7dfed87a04d8cb7ef12a7b4ed089..bd03835b6e8f50d2d4d2db5cb65d11a93b4ff4f2 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/cc_int_w_3.png and b/src/HYDRO_tests/reference_data/cc_int_w_3.png differ
index bedd58fa6b7972dc0ab84996fe69024f576aec3d..79fa6acb4b352339adfa52d579862ca7d3df069b 100644 (file)
@@ -1,6 +1,6 @@
 from HYDROPy import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
 
 hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
 
index 4ddd4ec9263b01630f70766855be7323170bf1dd..ea1c4d38c0d0bc163e990eb1dd8b481cba46b426 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/stream_dtm_2d.png and b/src/HYDRO_tests/reference_data/stream_dtm_2d.png differ
index dca76771398db752ab5620ac83495c227febb075..2f0eb241f63b15c813d88d53590849c9f176cc89 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/stream_dtm_3d.png and b/src/HYDRO_tests/reference_data/stream_dtm_3d.png differ
index 74d98977d0a639c028149702585f5986c7a90826..8d9f660231b6916d13f8816c0f76a61e7adb7231 100644 (file)
@@ -77,12 +77,19 @@ QRectF TestObject::boundingRect() const
 
 
 
-#define CPPUNIT_ASSERT_VIEW( theCase )          \
-  {                                             \
-    qApp->processEvents();                      \
-    QImage im = aViewPort->dumpView();          \
-    CPPUNIT_ASSERT_IMAGES2( &im, theCase );     \
-  }
+#define CPPUNIT_ASSERT_VIEW( theCase )                              \
+  {                                                                 \
+    qApp->processEvents();                                          \
+    QImage im = aViewPort->dumpView();                              \
+    const bool SWAP_RGB_ORDER = true;                               \
+    if( SWAP_RGB_ORDER )                                            \
+    {                                                               \
+      /* A temporary patch for bug in SALOME/OCC dump;              \
+         the result image contains swapped RGB colors  */           \
+      im = im.rgbSwapped();                                         \
+    }                                                               \
+    CPPUNIT_ASSERT_IMAGES2( &im, theCase );                         \
+  }                                                                 \
 
 void test_GraphicsView::test_wheel_zoom()
 {