# if we have rendering and views add the following tests
  # add tests that do not require data
  set(MyTests
    TestContextScene.cxx
    TestControlPointsItem.cxx
    TestControlPointsItemEvents.cxx
    )

  if(VTK_DATA_ROOT)
    # add tests that require data
    set(MyTests ${MyTests}
      TestBarGraph.cxx
      TestBarGraphHorizontal.cxx
      TestColorTransferFunction.cxx
      TestChartMatrix.cxx
      TestChartsOn3D.cxx
      TestChartXYZ.cxx
      TestContext.cxx
      TestContextImage.cxx
      TestControlPointsHandleItem.cxx
      TestDiagram.cxx
      TestHistogram2D.cxx
      TestLegendHiddenPlots.cxx
      TestLinePlot.cxx
      TestLinePlotAxisFonts.cxx
      TestLinePlot2.cxx
      TestLinePlotInteraction.cxx
      TestMultipleChartRenderers.cxx
      TestMultipleRenderers.cxx
      TestMultipleScalarsToColors.cxx
      TestParallelCoordinates.cxx
      TestPieChart.cxx
      TestPlotMatrix.cxx
      TestScalarsToColors.cxx
      TestScatterPlot.cxx
      TestScatterPlotMatrix.cxx
      TestScatterPlotMatrixVehicles.cxx
      TestScatterPlotMatrixVisible.cxx
      TestScientificPlot.cxx
      TestStackedBarGraph.cxx
      TestStackedPlot.cxx
      )
    # Set the tolerance higher for a few tests that need it
    set(TestGLSLError 12)
    set(TestChartsOn3DError 16)
    set(TestLinePlotError 25)
    set(TestLinePlot2Error 25)
    set(TestLinePlotInteractionError 25)
    set(TestMultipleRenderersError 25)
    set(TestMultipleScalarsToColorsError 25)
    set(TestParallelCoordinatesError 15)
    set(TestControlPointsHandleItemError 30)
  endif()

  # Use the testing object factory, to reduce boilerplate code in tests.
  include("${VTK_SOURCE_DIR}/Testing/Rendering/vtkTestingObjectFactory.cmake")
  vtk_module_test_executable(${vtk-module}CxxTests ${Tests})

  set(TestsToRun ${Tests})
  remove(TestsToRun CxxTests.cxx)

  # Add all the executables
  foreach(test ${TestsToRun})
    get_filename_component(TName ${test} NAME_WE)
    if(VTK_DATA_ROOT)
      if(${${TName}Error})
        set(_error_threshold ${${TName}Error})
      else()
        set(_error_threshold 10)
      endif()
      add_test(NAME Charts-${TName}
        COMMAND ${vtk-module}CxxTests ${TName}
          -D ${VTK_DATA_ROOT}
          -T ${VTK_BINARY_DIR}/Testing/Temporary
          -V Baseline/Charts/${TName}.png
          -E ${_error_threshold})
    else()
      add_test(NAME Charts-${TName} 
        COMMAND ${vtk-module}CxxTests ${TName})
    endif()
  endforeach()
