Salome HOME
Merge branch 'BR_MULTI_BATHS' into HEAD
[modules/hydro.git] / src / HYDRO_tests / TestViewer.cxx
index a8599d348b432d1b0085d1e534d7d3a51984170d..fce3baadf3643f100b23246b8d3b323bc88395bd 100644 (file)
@@ -257,9 +257,16 @@ bool AreImagesEqual( const QImage& theImage1, const QImage& theImage2, double th
   return true;
 }
 
-bool TestViewer::AssertImages( QString& theMessage )
+bool TestViewer::AssertImages( QString& theMessage, const QImage* theImage, const char* theCase )
 {
-  QImage anActualImage = viewWindow()->dumpView();
+  QImage anActualImage;
+  if( theImage )
+    anActualImage = *theImage;
+  else
+    anActualImage = viewWindow()->dumpView();
+
+  if( theCase )
+    myKey = theCase;
 
   QString anExpectedRefFilePath = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test";
   anExpectedRefFilePath += "/" + myKey + ".png";