#include <AIS_Shape.hxx>
#include <TopoDS_Iterator.hxx>
#include <QDir>
+#include <QPainter>
#include <cppunit/TestAssert.h>
OCCViewer_ViewManager* TestViewer::myViewManager = 0;
anActualImage.save( aPath );
std::string aMessage = "The viewer contents does not correspond to the reference image: " + theUseCaseName.toStdString();
CPPUNIT_FAIL( aMessage.c_str() );
+
+ QImage aDiff( anExpectedRefImage.width(), anExpectedRefImage.height(), QImage::Format_ARGB32 );
+ QPainter aPainter( &aDiff );
+ aPainter.drawImage( 0, 0, anExpectedRefImage );
+ aPainter.setCompositionMode( QPainter::RasterOp_SourceXorDestination );
+ aPainter.drawImage( 0, 0, anActualImage );
+
+ QString aDiffFilePath = QDir::tempPath() + "/" + theUseCaseName + "_diff.png";
+ aDiff.save( aPath );
+
return false;
}