This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: auto_ptr problems


On July 3, 2002 03:01 pm, Phil Edwards wrote:
> On Wed, Jul 03, 2002 at 11:30:53AM -0700, Benjamin Kosnik wrote:
> > I'm thinking of just adding a testsuite/negative toplevel directory
> > for the negative tests (currently map_operator.cc, set_operator.cc
> > also qualify.) I'm not quite sure what to do though. Thoughts,
> > anybody?
> >
> > Might be easier to just add a spot specifically for negative tests.
> > We need negative tests too. (ie, the test passes if compilation
> > fails).
>
> Rather a negative toplevel, I'd suggest negative_*.cc files in each
> of the exiting directories.  That way tests for <topic> are all
> nicely gathered in
>
>     nn_foo/topic.cc
>     nn_foo/topic_subtopic.cc
>     nn_foo/negative_topic.cc
>
> Alternative spellings of "negative_" include "neg_", "mustfail_", and
> "xfail_" for starters, although that last is a very posix/dejagnu
> name.

I agree that the expected failure tests should be lumped in with the 
expected pass tests.  I'd suggest appending rather than prepending the 
"fail" or whatever bit to the name so it sorts nicely.  It's a small 
thing but the small things add up.

I'd also point out that unlike the expected pass tests, a separate test 
source file is required for each expected compilation failure.  You'd 
end up with

    nn_foo/topic.cc
    nn_foo/topic_subtopic.cc
    nn_foo/topic_fail_reason1.cc
    nn_foo/topic_fail_reason1.cc

and so forth.

-- 
Stephen M. Webb


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]