[Insight-developers] Exception not a test failure?

Lydia Ng lng@insightful.com
Fri, 28 Feb 2003 10:09:53 -0800


The original idea was also to test if it handles the failure properly.
I.e. if the FixedImage is not set and you try to run the registration
then it should throw an exception.

In-house when we routinely test the error handling as well. So I was
doing the same for some of these classes too.

I know that these "exception" throwing tests are causing problems in
linux/gcc.=20

Is the solution to get rid of these tests?

What do others think?

- Lydia

> -----Original Message-----
> From: Brad King [mailto:brad.king@kitware.com]
> Sent: Friday, February 28, 2003 9:53 AM
> To: Insight Developers
> Subject: [Insight-developers] Exception not a test failure?
>=20
> Hello,
>=20
> The following lines are present in
> itkMultiResolutionImageRegistrationMethodTest.cxx:
>=20
>   catch( itk::ExceptionObject& err ) \
>     { \
>     std::cout << "Caught expected ExceptionObject" << std::endl; \
>     std::cout << err << std::endl; \
>     pass =3D true; \
>     } \
>=20
> Why does the test pass if an exception was thrown?
>=20
> -Brad
>=20
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers