|
Boost : |
Subject: Re: [boost] C++03 unique_ptr emulation
From: Howard Hinnant (hinnant_at_[hidden])
Date: 2009-01-03 13:36:41
On Jan 3, 2009, at 1:28 PM, Beman Dawes wrote:
> On Sat, Jan 3, 2009 at 11:08 AM, Howard Hinnant
> <hinnant_at_[hidden]> wrote:
>> On Jan 3, 2009, at 10:51 AM, Sebastian Redl wrote:
>>
>>> Howard Hinnant wrote:
>>>>
>>>> Although I've been running tests, I don't really yet have a neatly
>>>> packaged test suite. Part of the problem is that many of the tests
>>>> are "must fail" and I don't know of a portable/automated way to
>>>> handle
>>>> that kind of test. Has boost addressed "must fail" tests?
>>>
>>> Isn't that what compile-fail Jam instructions are for? Just
>>> remember to
>>> put each test case in its own file, or failures will be masked.
>>
>> I've never used Jam before. I'll take a look.
>
> It is a lot of work to gain even a moderately deep understanding of
> bjam, but if you treat it like magic, some of the simpler incantations
> are very easy to learn. compile-fail tests fall in the simple
> category.
>
> In https://svn.boost.org/svn/boost/sandbox/chrono, take a look at
> libs/chrono/test/Jamfile.v2 and ratio_fail_test1.cpp.
>
> If I run "bjam --toolset gcc", note that the test is reported as
> "**passed**", because there were compile errors.
>
> Temporarily change ratio_fail_test1.cpp so that the ratio multiply
> doesn't overflow, and the compile will work but the test will be
> reported as failing
Forget pictures. A good example is truly worth a thousand words! :-)
Thanks Beman.
-Howard
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk