From 09bdbe61addf9b857231448273adedbfcbc9d9dd Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Tue, 14 Feb 2012 13:56:17 -0500 Subject: [PATCH] ENH: fixing testing * enabled Cxx tests * added test for ReportingAnnotationRANONode, made sure it passes --- Testing/Cxx/CMakeLists.txt | 21 +++++++++++++++++++-- qSlicerReportingModule.cxx | 7 +++++++ qSlicerReportingModule.h | 2 ++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/Testing/Cxx/CMakeLists.txt b/Testing/Cxx/CMakeLists.txt index 48eddf1..b89a96b 100644 --- a/Testing/Cxx/CMakeLists.txt +++ b/Testing/Cxx/CMakeLists.txt @@ -1,3 +1,4 @@ +set(KIT Reporting) set(KIT_TEST_SRCS) set(KIT_TEST_NAMES) set(KIT_TEST_NAMES_CXX) @@ -8,6 +9,7 @@ create_test_sourcelist(Tests ${EXTENSION_NAME}CxxTests.cxx ${KIT_TEST_NAMES_CXX} # Add source of your tests after this line. vtkSlicerReportingModuleLogicTest1.cxx + vtkMRMLReportingAnnotationRANONodeTest1.cxx #EXTRA_INCLUDE TestingMacros.h ) list(REMOVE_ITEM Tests ${KIT_TEST_NAMES_CXX}) @@ -25,8 +27,23 @@ macro(SIMPLE_TEST TESTNAME) add_test(NAME ${TESTNAME} COMMAND ${Slicer_LAUNCH_COMMAND} $ ${TESTNAME} ${ARGN}) endmacro() -foreach(testname ${KIT_TEST_NAMES}) - SIMPLE_TEST( ${testname} ) +# +# Add all the tests +# +foreach(test ${Tests}) + get_filename_component(TESTNAME ${test} NAME_WE) + add_test( + NAME ${TESTNAME} + COMMAND ${Slicer_LAUNCH_COMMAND} $ ${TESTNAME} + -D ${CMAKE_CURRENT_SOURCE_DIR}/../ + -T ${TEMP} + #-V Baseline/${TESTNAME}.png + ) endforeach() + +#foreach(testname ${KIT_TEST_NAMES}) +# SIMPLE_TEST( ${testname} ) +#endforeach() + # Using SIMPLE_TEST(), you could add your test after this line. diff --git a/qSlicerReportingModule.cxx b/qSlicerReportingModule.cxx index 01671d9..f1e14e0 100644 --- a/qSlicerReportingModule.cxx +++ b/qSlicerReportingModule.cxx @@ -99,6 +99,13 @@ QStringList qSlicerReportingModule::dependencies() const return QStringList() << "Annotations" << "Volumes"; } +//----------------------------------------------------------------------------- +QStringList qSlicerReportingModule::contributors() const +{ + return QStringList() << "Andrey Fedorov" << "Nicole Aucoin"; +} + + //----------------------------------------------------------------------------- void qSlicerReportingModule::setup() { diff --git a/qSlicerReportingModule.h b/qSlicerReportingModule.h index e07360f..00cc2a2 100644 --- a/qSlicerReportingModule.h +++ b/qSlicerReportingModule.h @@ -55,6 +55,8 @@ class Q_SLICER_QTMODULES_REPORTING_EXPORT qSlicerReportingModule : /// Return the dependencies virtual QStringList dependencies() const; + /// Return the contributors + virtual QStringList contributors() const; protected: