Commit 9e54949c authored by Yuanxin Liu's avatar Yuanxin Liu
Browse files

add back one more test and clean up the existing one

Change-Id: Iaa39be29ad3c836d212c129ad988e84072380973
parent 5f6ae052
set(MyTests
Set(MyTests
# TestBSplineWarp.cxx # Fixme after vtkImageViewer deps
TestPolyDataSilhouette.cxx
TestTemporalCacheSimple.cxx
)
# Use the testing object factory, to reduce boilerplate code in tests.
include("${vtkTestingRendering_SOURCE_DIR}/vtkTestingObjectFactory.cmake")
vtk_module_test_executable(${vtk-module}CxxTests ${Tests})
if(VTK_DATA_ROOT)
add_test(NAME ${vtk-module}Cxx-PolyDataSilhouette
COMMAND ${vtk-module}CxxTests TestPolyDataSilhouette
${VTK_DATA_ROOT}/Data/cow.vtp
-D ${VTK_DATA_ROOT}
-T ${VTK_TEST_OUTPUT_DIR}
-V Baseline/Hybrid/TestPolyDataSilhouette.png)
endif()
set(TestsToRun ${Tests})
list(REMOVE_ITEM TestsToRun CxxTests.cxx)
# Add all the executables
message("${TestsToRun}")
foreach(test ${TestsToRun})
get_filename_component(TName ${test} NAME_WE)
if(VTK_DATA_ROOT)
add_test(NAME ${vtk-module}Cxx-${TName}
COMMAND ${vtk-module}CxxTests ${TName}
-D ${VTK_DATA_ROOT}
-T ${VTK_TEST_OUTPUT_DIR}
-V Baseline/Hybrid/${TName}.png)
else()
add_test(NAME ${vtk-module}Cxx-${TName}
COMMAND ${vtk-module}CxxTests ${TName})
endif()
endforeach()
\ No newline at end of file
......@@ -10,10 +10,12 @@
#include <vtkSphereSource.h>
#include <vtkXMLPolyDataReader.h>
#include <vtkCleanPolyData.h>
#include <vtkTestUtilities.h>
int TestPolyDataSilhouette(int argc, char *argv[])
{
vtkSmartPointer<vtkPolyData> polyData;
char* fname(NULL);
if (argc < 2)
{
vtkSmartPointer<vtkSphereSource> sphereSource =
......@@ -24,9 +26,10 @@ int TestPolyDataSilhouette(int argc, char *argv[])
}
else
{
fname = vtkTestUtilities::ExpandDataFileName(argc, argv, "Data/cow.vtp");
vtkSmartPointer<vtkXMLPolyDataReader> reader =
vtkSmartPointer<vtkXMLPolyDataReader>::New();
reader->SetFileName(argv[1]);
reader->SetFileName(fname);
vtkSmartPointer<vtkCleanPolyData> clean =
vtkSmartPointer<vtkCleanPolyData>::New();
......@@ -86,5 +89,6 @@ int TestPolyDataSilhouette(int argc, char *argv[])
renderWindow->Render();
iren->Start();
delete[] fname;
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