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 );
QString aDiffFilePath = QDir::tempPath() + "/" + myKey + "_diff.png";
aDiff.save( aDiffFilePath );
+ anExpectedRefImage.save( QDir::tempPath() + "/" + myKey + "_1.png");
+
return false;
}
}
}
+bool TestViewer::ColorScaleIsDisplayed()
+{
+ Handle(V3d_View) aView = myViewWindow->getViewPort()->getView();
+ if( aView.IsNull() )
+ return false;
+ return aView->ColorScaleIsDisplayed();
+}
+
void TestViewer::select( int theViewX, int theViewY )
{
Handle(V3d_View) aView = myViewWindow->getViewPort()->getView();