[vtk-developers] vtkRenderingOpenGL2Cxx-TestDepthOfFieldPass ERRORs

Ben Boeckel ben.boeckel at kitware.com
Tue Oct 27 00:35:30 EDT 2015


On Tue, Oct 27, 2015 at 03:42:20 +0000, Andras Lasso wrote:
> The limitation of using FAIL_REGULAR_EXPRESSION CTest property for
> catching errors is that it's very difficult (if at all possible) to
> catch unexpected errors when there are expected errors as well.

That's what vtkErrorObserver is for. It traps errors (without printing
to stderr) which are then compared against to ensure they happened. Any
errors not expected or which didn't actually fire are a failure caught
either by the error-happened checking code or by CTest.

> When you use vtkTestingOutputWindow class then the default behavior is
> to return with failure at the end of the test if warnings/errors have
> been logged; but you can easily mark sections of code that are
> expected/allowed to log errors. See some examples below.

How do you catch bits of code which output extra errors or stop
outputting errors in this case?

--Ben


More information about the vtk-developers mailing list