]> SALOME platform Git repositories - modules/hydro.git/blobdiff - src/HYDRO_tests/TestViewer.cxx
Salome HOME
using DTM object in stream
[modules/hydro.git] / src / HYDRO_tests / TestViewer.cxx
index 196df1f00f03fccce966f71e650f982229db214b..fce3baadf3643f100b23246b8d3b323bc88395bd 100644 (file)
@@ -257,11 +257,18 @@ 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();
 
-  QString anExpectedRefFilePath = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test/HYDRO";
+  if( theCase )
+    myKey = theCase;
+
+  QString anExpectedRefFilePath = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test";
   anExpectedRefFilePath += "/" + myKey + ".png";
   QImage anExpectedRefImage; 
   anExpectedRefImage.load( anExpectedRefFilePath );
@@ -286,6 +293,8 @@ bool TestViewer::AssertImages( QString& theMessage )
   QString aDiffFilePath = QDir::tempPath() + "/" + myKey + "_diff.png";
   aDiff.save( aDiffFilePath );
 
+  anExpectedRefImage.save( QDir::tempPath() + "/" + myKey + "_1.png");
+
   return false;
 }