Commit 90e1452e authored by Marcus D. Hanwell's avatar Marcus D. Hanwell Committed by Kitware Robot
Browse files

Merge topic 'charts/tests'

88370b4f ENH: Testing interactor takes care of images.
e6ae6898 BUG: Fail gracefully when GLSL can't compile.
parents 162a6773 88370b4f
......@@ -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
......
......@@ -101,19 +101,18 @@ int TestGLSL( int argc, char * argv [] )
// Ensure that there is a valid OpenGL context - Mac inconsistent behavior.
view->GetRenderWindow()->SetMultiSamples(0);
int retVal = vtkRegressionTestImage(view->GetRenderWindow());
view->GetInteractor()->Start();
// Need to attempt at least one render, to see if the GLSL can compile.
view->Render();
if (test->IsCompiled)
{
return !retVal;
view->GetInteractor()->Start();
}
else
{
cout << "GLSL 1.20 required, shader failed to compile." << endl;
return 0;
}
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