Subject: Re: [boost] Re : [Block Pointer] make_block
From: Phil Bouchard (philippe_at_[hidden])
Date: 2011-04-30 12:52:22
On 4/30/2011 12:31 AM, Pierre Morcello wrote:
> Hi Phil,
> A detail : I think you could improve your sample by replacing __FUNCTION__ by BOOST_CURRENT_FUNCTION (which is more portable), or by writing directly the name of the function.
>>>> Is it time for a review?
> I looked for automated tests in the sandbox directory (not examples) and I did not find any.
I completely forgot about that, thanks for the hint.
> Instead of doing "cout", you could use a class like that :
> class ForTests
> static int counter; // incremented at each construction
> int id; // id = current value of the counter in the constructor
> static std::vector<int> destructionOrder;
> Each destruction pushes the id in the destructionOrder vector.
> Then at the end of the program you just need to compare the content of destructionOrder with what you should expect (and return 1 or 0). Also the same might be done for construction.
> Good job BTW, and good luck for the review,
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk