ITK/Release 4/Modularization/ Add tests

From KitwarePublic
< ITK‎ | Release 4‎ | Modularization
Revision as of 15:41, 4 April 2011 by Xiaoxiao (talk | contribs)
Jump to navigationJump to search
  • Regression tests: need test driver

Approach a: stand-alone regression test

Approach b: using the test driver macro



  • Non-regression tests

add_executable( [executable name] [source file or files])

target_link_libraries([executable name] <name of libraries])

add_test(NAME [test name] COMMAND [executable name] [arguments])

 e.g. add_executable(itkBinaryThresholdFilterTest itkBinaryThresholdFilterTest.cxx)
      target_link_libraries(itkBindaryThresholdFilterTest ${ITK-BinaryThreshold_LIBRARIES})
      add_test(NAME itkBinaryThresholdFilterTest  
            COMMAND itkBinaryThresholdFilterTest input.png output.png)