Commit 88370b4f authored by Marcus D. Hanwell's avatar Marcus D. Hanwell
Browse files

ENH: Testing interactor takes care of images.

Let the testing interactor take care of the image comparisons when
appropriate. Currently has a hard coded tolerance of 40, which should
work for most of the chart tests.
parent e6ae6898
......@@ -56,11 +56,8 @@ int TestContext( int argc, char * argv [] )
->SetStringRendererToFreeType();
view->GetRenderWindow()->SetMultiSamples(0);
view->GetRenderWindow()->Render();
int retVal = vtkRegressionTestImage(view->GetRenderWindow());
view->GetInteractor()->Start();
return !retVal;
return EXIT_SUCCESS;
}
// Make our new derived class to draw a diagram
......
......@@ -46,9 +46,6 @@ int TestContextImage(int argc, char * argv [])
item->SetPosition(25, 30);
view->GetRenderWindow()->SetMultiSamples(0);
view->GetRenderWindow()->Render();
int retVal = vtkRegressionTestImage(view->GetRenderWindow());
view->GetInteractor()->Start();
return !retVal;
return EXIT_SUCCESS;
}
......@@ -64,11 +64,8 @@ int TestDiagram( int argc, char * argv [] )
VTK_CREATE(vtkRenderWindowInteractor, interactor);
interactor->SetRenderWindow(renderWindow);
renderWindow->SetMultiSamples(0);
renderWindow->Render();
int retVal = vtkRegressionTestImage(renderWindow);
interactor->Start();
return !retVal;
return EXIT_SUCCESS;
}
// Make our new derived class to draw a diagram
......
......@@ -23,7 +23,6 @@
#include "vtkContextView.h"
#include "vtkContextScene.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkRegressionTestImage.h"
//----------------------------------------------------------------------------
int TestLinePlot( int argc, char * argv [] )
......@@ -78,7 +77,6 @@ int TestLinePlot( int argc, char * argv [] )
//Finally render the scene and compare the image to a reference image
view->GetRenderWindow()->SetMultiSamples(0);
int retVal = vtkRegressionTestImageThreshold(view->GetRenderWindow(), 25);
view->GetInteractor()->Start();
return !retVal;
return EXIT_SUCCESS;
}
......@@ -196,8 +196,7 @@ int TestLinePlotInteraction(int argc, char * argv[])
// testing option fails.
recorder->Off();
int retVal = vtkRegressionTestImageThreshold(view->GetRenderWindow(), 25);
view->GetInteractor()->Start();
return !retVal;
return EXIT_SUCCESS;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment