Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost-users] [test] Boost.Test Mock
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2010-03-02 13:25:51


Andrey Torba <andreytorba <at> gmail.com> writes:

> I've just discovered for myself BOOST_TEST_EXCEPTION_SAFETY
> and  boost::itest::mock_object. I would like read more about
> this tools.What is the algorithm of running test case of
> BOOST_TEST_EXCEPTION_SAFETY?

The idea, which originally should be attributed to David Abrahams I believe, is
to test an exception safety of generic components. You implement particular
interaction (for example adding element to the generic collection) based on
generic component instantiated with mock object, specify all the invariants and
the test case will check that no memory leaks and no invariants will be broken
regardless where and if an exception occurred.

You can see an example of it's usage in examples folder. Unfortunately as of now
there is no documentation page covering this functionality.

Gennadiy


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net