Skip to content
  • lassoan's avatar
    ENH: Added VTK output window class for capturing VTK errors/warnings during testing · 74807e1b
    lassoan authored
    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
    74807e1b