Import 2017-06-07 23:51:09: master 74807e1b

Author Committer Branch Timestamp Parent
lassoan lassoan master 2015-03-26 00:20:09 master d354fef4
Changeset

ENH: Added VTK output window class for capturing VTK errors/warnings during testing

Currently VTK errors and warnings are ignored in automatic test, while they often
detect real errors. This class helps detecting unexpected errors and warnings.

Example use:

// Initialize output window. All messages are logged to the console.
TESTING_OUTPUT_INIT;

...

// Set up a checkpoint, we restart counting messages from this point
TESTING_OUTPUT_RESET;
...do something that should not log error messages
// Exit with EXIT_FAILURE if any warnings or errors are logged
TESTING_OUTPUT_ASSERT_WARNINGS_ERRORS(0);

TESTING_OUTPUT_RESET;
...do something that should log error messages
TESTING_OUTPUT_ASSERT_ERRORS_MINIMUM(1);

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24111 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Libs/vtkAddon/CMakeLists.txt Diff File
mod - Libs/vtkAddon/Testing/vtkLoggingMacrosTest1.cxx Diff File
add - Libs/vtkAddon/vtkTestingOutputWindow.cxx Diff File
add - Libs/vtkAddon/vtkTestingOutputWindow.h Diff File