| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 | set(KIT ${PROJECT_NAME})## Tests#set(TEST_SOURCES  ctkVTKDataSetArrayComboBoxTest1.cpp  ctkVTKDataSetModelTest1.cpp  ctkVTKMatrixWidgetTest1.cpp  ctkVTKMagnifyViewTest1.cpp  ctkVTKScalarBarWidgetTest1.cpp  ctkVTKThresholdWidgetTest1.cpp  ctkTransferFunctionBarsItemTest1.cpp  ctkTransferFunctionViewTest1.cpp  ctkTransferFunctionViewTest2.cpp  ctkTransferFunctionViewTest3.cpp  ctkTransferFunctionViewTest4.cpp  ctkTransferFunctionViewTest5.cpp  ctkVTKPropertyWidgetTest.cpp  ctkVTKRenderViewTest1.cpp  ctkVTKScalarsToColorsUtilsTest1.cpp  ctkVTKSliceViewTest1.cpp  ctkVTKSurfaceMaterialPropertyWidgetTest1.cpp  ctkVTKTextPropertyWidgetTest1.cpp  ctkVTKThumbnailViewTest1.cpp  ctkVTKWidgetsUtilsTestGrabWidget.cpp  )if(CTK_USE_CHARTS)  set(TEST_SOURCES      ctkVTKChartViewTest1.cpp      ctkVTKVolumePropertyWidgetTest1.cpp      ctkVTKScalarsToColorsViewTest1.cpp      ctkVTKScalarsToColorsViewTest2.cpp      ctkVTKScalarsToColorsViewTest3.cpp      ctkVTKScalarsToColorsViewTest4.cpp      ctkVTKScalarsToColorsWidgetTest1.cpp      ctkVTKScalarsToColorsWidgetTest2.cpp      ctkVTKScalarsToColorsWidgetTest3.cpp      ${TEST_SOURCES})endif()## Tests expecting CTKData to be set#if(EXISTS "${CTKData_DIR}")  list(APPEND TEST_SOURCES    ctkVTKMagnifyViewTest2.cpp    ctkVTKSliceViewTest2.cpp    ctkVTKRenderViewTest2.cpp    )endif()## Test expecting CTK_USE_QTTESTING to be ON#if(CTK_USE_QTTESTING)  list(APPEND TEST_SOURCES    ctkVTKDataSetArrayComboBoxEventTranslatorPlayerTest1.cpp    ctkVTKDataSetModelEventTranslatorPlayerTest1.cpp#    ctkVTKMagnifyViewEventTranslatorPlayerTest1.cpp    ctkVTKMatrixWidgetEventTranslatorPlayerTest1.cpp    ctkVTKRenderViewEventTranslatorPlayerTest1.cpp    ctkVTKScalarBarWidgetEventTranslatorPlayerTest1.cpp#    ctkVTKScalarsToColorsUtilsEventTranslatorPlayerTest1.cpp#    ctkVTKScalarsToColorsViewEventTranslatorPlayerTest1.cpp#    ctkVTKScalarsToColorsWidgetEventTranslatorPlayerTest1.cpp#    ctkVTKSliceViewEventTranslatorPlayerTest1.cpp#    ctkVTKSurfaceMaterialPropertyWidgetEventTranslatorPlayerTest1.cpp    ctkVTKTextPropertyWidgetEventTranslatorPlayerTest1.cpp#    ctkVTKThresholdWidgetEventTranslatorPlayerTest1.cpp#    ctkVTKVolumePropertyWidgetEventTranslatorPlayerTest1.cpp    )endif()include_directories(${CMAKE_SOURCE_DIR}/Libs/Testing                    ${CMAKE_CURRENT_BINARY_DIR})create_test_sourcelist(Tests ${KIT}CppTests.cpp  ${TEST_SOURCES}  #EXTRA_INCLUDE TestingMacros.h  )SET (TestsToRun ${Tests})REMOVE (TestsToRun ${KIT}CppTests.cpp)set(LIBRARY_NAME ${PROJECT_NAME})## If CTK_USE_QTTESTING is ON#if(CTK_USE_QTTESTING)  ctkQtTesting(Tests TEST_MOC_SOURCES TEST_UI_FORMS Tests_RESOURCES)endif()set(TEST_MOC_CPP)if(TEST_MOC_SOURCES)  QT4_WRAP_CPP(TEST_MOC_CPP ${TEST_MOC_SOURCES})endif()QT4_GENERATE_MOCS(  ctkVTKPropertyWidgetTest.cpp  )set(TEST_UI_CPP)if(TEST_UI_FORMS)  QT4_WRAP_UI(TEST_UI_CPP ${TEST_UI_FORMS})endif()set(Tests_RESOURCES_SRCS)QT4_ADD_RESOURCES(Tests_RESOURCES_SRCS ${Tests_RESOURCES})add_executable(${KIT}CppTests ${Tests} ${TEST_MOC_CPP} ${TEST_UI_CPP} ${Tests_RESOURCES_SRCS})target_link_libraries(${KIT}CppTests ${LIBRARY_NAME} vtkCharts ${CTK_BASE_LIBRARIES})## Add Tests#SIMPLE_TEST( ctkVTKDataSetArrayComboBoxTest1 )SIMPLE_TEST( ctkVTKDataSetModelTest1 )SIMPLE_TEST( ctkVTKMagnifyViewTest1 )SIMPLE_TEST( ctkVTKMatrixWidgetTest1 )SIMPLE_TEST( ctkVTKPropertyWidgetTest )SIMPLE_TEST( ctkVTKScalarBarWidgetTest1 )SIMPLE_TEST( ctkVTKScalarsToColorsUtilsTest1 )SIMPLE_TEST( ctkVTKThresholdWidgetTest1 )SIMPLE_TEST( ctkTransferFunctionBarsItemTest1 )SIMPLE_TEST( ctkTransferFunctionViewTest1 )SIMPLE_TEST( ctkTransferFunctionViewTest2 )SIMPLE_TEST( ctkTransferFunctionViewTest3 )SIMPLE_TEST( ctkTransferFunctionViewTest4 )SIMPLE_TEST( ctkTransferFunctionViewTest5 )if(CTK_USE_CHARTS)  SIMPLE_TEST( ctkVTKChartViewTest1 )  SIMPLE_TEST( ctkVTKVolumePropertyWidgetTest1 )  SIMPLE_TEST( ctkVTKScalarsToColorsViewTest1 )  SIMPLE_TEST( ctkVTKScalarsToColorsViewTest2 )  SIMPLE_TEST( ctkVTKScalarsToColorsViewTest3 )  SIMPLE_TEST( ctkVTKScalarsToColorsViewTest4 )  SIMPLE_TEST( ctkVTKScalarsToColorsWidgetTest1 )  SIMPLE_TEST( ctkVTKScalarsToColorsWidgetTest2 )  SIMPLE_TEST( ctkVTKScalarsToColorsWidgetTest3 )endif()SIMPLE_TEST( ctkVTKRenderViewTest1 )SIMPLE_TEST( ctkVTKSliceViewTest1 )SIMPLE_TEST( ctkVTKSurfaceMaterialPropertyWidgetTest1 )SIMPLE_TEST( ctkVTKTextPropertyWidgetTest1 )SIMPLE_TEST( ctkVTKThumbnailViewTest1 )SIMPLE_TEST( ctkVTKWidgetsUtilsTestGrabWidget )## Add Tests expecting CTKData to be set#if(EXISTS "${CTKData_DIR}")  set(baseline_relative_location Libs/Visualization/VTK/Widgets)  macro(MAGNIFY_WIDGET_TEST TESTNAME TESTTYPE SIZE MAGNIFICATION)    SIMPLE_TEST_WITH_DATA(${TESTNAME}${TESTTYPE} ${baseline_relative_location}      -T "${TESTTYPE}"      -S "${SIZE}"      -M "${MAGNIFICATION}"      )  endmacro()  #  # Dependencies required so that these tests won't run in parallel  #  MAGNIFY_WIDGET_TEST( ctkVTKMagnifyViewTest2 OddOdd 341 17 )  MAGNIFY_WIDGET_TEST( ctkVTKMagnifyViewTest2 EvenEven 340 18 )  set_tests_properties( ctkVTKMagnifyViewTest2EvenEven                        PROPERTIES DEPENDS                        ctkVTKMagnifyViewTest2OddOdd )  MAGNIFY_WIDGET_TEST( ctkVTKMagnifyViewTest2 OddEven 341 18 )  set_tests_properties( ctkVTKMagnifyViewTest2OddEven                        PROPERTIES DEPENDS                        ctkVTKMagnifyViewTest2EvenEven )  MAGNIFY_WIDGET_TEST( ctkVTKMagnifyViewTest2 EvenOdd 340 17 )  set_tests_properties( ctkVTKMagnifyViewTest2EvenOdd                        PROPERTIES DEPENDS                        ctkVTKMagnifyViewTest2OddEven )  SIMPLE_TEST_WITH_DATA( ctkVTKRenderViewTest2 ${baseline_relative_location})  SIMPLE_TEST_WITH_DATA( ctkVTKSliceViewTest2 ${baseline_relative_location})endif()## Add Tests expecting CTK_USE_QTTESTING to be set#if(CTK_USE_QTTESTING)    SIMPLE_TEST( ctkVTKDataSetArrayComboBoxEventTranslatorPlayerTest1 )    SIMPLE_TEST( ctkVTKDataSetModelEventTranslatorPlayerTest1 )#    SIMPLE_TEST( ctkVTKMagnifyViewEventTranslatorPlayerTest1 )    SIMPLE_TEST( ctkVTKMatrixWidgetEventTranslatorPlayerTest1 )    SIMPLE_TEST( ctkVTKRenderViewEventTranslatorPlayerTest1 )    SIMPLE_TEST( ctkVTKScalarBarWidgetEventTranslatorPlayerTest1 )#    SIMPLE_TEST( ctkVTKScalarsToColorsUtilsEventTranslatorPlayerTest1 )#    SIMPLE_TEST( ctkVTKScalarsToColorsViewEventTranslatorPlayerTest1 )#    SIMPLE_TEST( ctkVTKScalarsToColorsWidgetEventTranslatorPlayerTest1 )#    SIMPLE_TEST( ctkVTKSliceViewEventTranslatorPlayerTest1 )#    SIMPLE_TEST( ctkVTKSurfaceMaterialPropertyWidgetEventTranslatorPlayerTest1 )    SIMPLE_TEST( ctkVTKTextPropertyWidgetEventTranslatorPlayerTest1 )#    SIMPLE_TEST( ctkVTKThresholdWidgetEventTranslatorPlayerTest1 )#    SIMPLE_TEST( ctkVTKVolumePropertyWidgetEventTranslatorPlayerTest1 )endif()
 |