incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Lemings" <Eric.Lemi...@roguewave.com>
Subject RE: svn commit: r667638 - /stdcxx/branches/4.3.x/tests/utilities/20.forward.cpp
Date Mon, 16 Jun 2008 17:07:16 GMT
 

> -----Original Message-----
> From: Travis Vitek [mailto:Travis.Vitek@roguewave.com] 
> Sent: Monday, June 16, 2008 9:46 AM
> To: dev@stdcxx.apache.org
> Subject: RE: svn commit: r667638 - 
> /stdcxx/branches/4.3.x/tests/utilities/20.forward.cpp
> 
> 
...
> believe it should
> be
> 
>   Copyright 2008 Rogue Wave Software, Inc.

Done.

> 
> elemings wrote:
> > 
> > +
> > +static void
> > +test_identity ()
> > +{
> > +    rw_info (0, __FILE__, __LINE__, "std::identity<T> class
> template");
> > +
> > 
> 
> We ususally don't use the __FILE__ tag with code that is in 
> the original
> test file. I'm not exactly sure why, but I don't recall ever seeing it
> used.
> Perhaps this is to reduce the amount of output generated in the output
> files?

Hehe.  Who knows why some files omit it.  I think its just something
that's
been carried over without a second's thought.  Sort of like why many
template
parameters are named "_TypeT" when there is only one type parameter.
The name
"_TypeT" is actually only needed in contexts where there's a
corresponding
"_TypeU".  Otherwise, the name "_Type" is sufficient.

> 
> Another thing to note is that most of the stdcxx tests don't display
> anything other than the header when they run, unless something fails.

Ah.  The --trace option is new to me.  I guess it's supposed to act sort
of like the the rw_info() calls.  I'll keep that in mind when writing
test code in the future.


> AFAICT, the ones that do are those that have been migrated from
> perforce. In
> a recent change, Martin actually removed the informational 
> messages from
> one
> test [http://tinyurl.com/6dg2xf]
> 
> 
> elemings wrote:
> > 
> > +    int i = 1;
> > +    FooIdent foo_ident;
> > +    Foo foo = foo_ident (i);
> > +
> > 
> 
> Shouldn't this check the signature of operator() and verifty that it
> returns
> the input parameter?

Yep, probably should.

> 
> 
> elemings wrote:
> > 
> > +
> > +static int
> > +run_test (int /*unused*/, char* /*unused*/ [])
> > +{
> > 
> 
> We usually omit the parameter names entirely. I don't think I've ever
> seen
> any stdcxx code that comments them out.

Actually the comments should contain the intended parameter names (i.e.
"argc" and "argv") but since the parameter names are always omitted in
this case, I have no problem with just omitting them.

> 
> 
> elemings wrote:
> > 
> > +#else // no rvalue references
> > +
> > +    rw_info (true, __FILE__, __LINE__,
> > +             "No compiler support for rvalue references; tests
> > disabled.");
> > 
> 
> Shouldn't the first parameter be 0, which is consistent with the
> expected
> type of the first argument and will cause the informational message to
> always be displayed. It is also consistent with the other rw_info()
> calls
> you use in the same file.

Roger that.

> 
> 
> elemings wrote:
> > 
> > +
> > +#endif   // !defined _RWSTD_NO_RVALUE_REFERENCES
> > +
> > +    return 0;
> > +}
> > +
> > +/*extern*/ int
> > +main (int argc, char* argv [])
> > +{
> > +    return rw_test (argc, argv, __FILE__,
> > +                    "[forward]", "20.2.2  forward/move helpers",
> > 
> 
> I think we use the name of the section of the standard being tested
> without
> the brackets. Also, we should avoid using the section number as it is
> likely
> to change with every revision of the standard.

Well, it SHOULD only change at most once more if the committee
accomplished
what they intended at last week's Sophia Antipolis meeting.  :)

Brad.

Mime
View raw message