anExpectedRefFilePath += "/" + myKey + ".png";
QImage anExpectedRefImage;
anExpectedRefImage.load( anExpectedRefFilePath );
- std::cout << "Expected image loading: " << anExpectedRefFilePath.toStdString() << std::endl;
+ //std::cout << "Expected image loading: " << anExpectedRefFilePath.toStdString() << std::endl;
if( AreImagesEqual( anActualImage, anExpectedRefImage, 0.001 ) )
{
return true;
}
- QString aPath = QDir::tempPath() + "/" + myKey + ".png";
+ QString temp = QDir::tempPath();
+#ifndef WIN32
+ temp += "/hydro";
+ if( !QDir().exists( temp ) )
+ QDir().mkpath( temp );
+#endif
+
+ QString aPath = temp + "/" + myKey + ".png";
anActualImage.save( aPath );
- std::cout << "Actual image: " << aPath.toStdString() << std::endl;
+ //std::cout << "Actual image: " << aPath.toStdString() << std::endl;
//std::cout << anActualImage.width() << "x" << anActualImage.height() << std::endl;
theMessage = "The viewer contents does not correspond to the reference image: " + myKey;
aPainter.setCompositionMode( QPainter::RasterOp_SourceXorDestination );
aPainter.drawImage( 0, 0, anActualImage );
- QString aDiffFilePath = QDir::tempPath() + "/" + myKey + "_diff.png";
+ QString aDiffFilePath = temp + "/" + myKey + "_diff.png";
aDiff.save( aDiffFilePath );
- std::cout << "Diff image: " << aDiffFilePath.toStdString() << std::endl;
+ //std::cout << "Diff image: " << aDiffFilePath.toStdString() << std::endl;
- QString anExpected = QDir::tempPath() + "/" + myKey + "_1.png";
- std::cout << "Expected image: " << anExpected.toStdString() << std::endl;
+ QString anExpected = temp + "/" + myKey + "_1.png";
+ //std::cout << "Expected image: " << anExpected.toStdString() << std::endl;
anExpectedRefImage.save( anExpected );
return false;
BRep_Builder B;
TopoDS_Shape shape;
std::string fname = (REF_DATA_PATH + "/test_zone.brep").toStdString();
- std::cout << "Loading shape: " << fname << std::endl;
+ //std::cout << "Loading shape: " << fname << std::endl;
BRepTools::Read( shape, fname.c_str(), B );
TestViewer::show( shape, AIS_Shaded, true, 0x03399FF );