Boost logo

Boost Users :

Subject: Re: [Boost-users] boost test with assert()
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2008-11-24 11:18:15

Uwe Schuster <Uwe.Schuster <at>> writes:

> > From: Hicham Mouline
> >
> > Because RemoveSimulation(....) takes arguments which are not available
> > inside the SimulatonId object/destructor.
> Hi Hicham,
> In our test suites we deal with this problem by using an own special
> implementation of the assert() function. In this assert, called
> dynamicAssert() or runTimeAssert(), we call the real assert() only if
> the application is not running under test application. If running under
> test, we throw an special exception type instead, e.g. AssertionEx. This
> exception can be caught by the UTF and tested by Test-Tools. The

He wants to perform check in destructor. Throwing an exception might cause
problem. Maybe in conjunction with uncaught_exception() it can be made to work.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at