
30 Apr
2011
30 Apr
'11
11:39 p.m.
On 4/30/2011 12:31 AM, Pierre Morcello wrote:
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.
I added the automated test here: https://svn.boost.org/svn/boost/sandbox/block_ptr/libs/smart_ptr/test/block_... I am having issues with the Jamfile but there's a Makefile which works well. -Phil