Boost logo

Boost :

From: Jody Hagins (jody-boost-011304_at_[hidden])
Date: 2005-06-06 23:30:29


On Mon, 06 Jun 2005 23:20:29 +0200
Tobias Schwinger <tschwinger_at_[hidden]> wrote:

> Jody Hagins wrote:
> > is_function_type.cpp
> >
> > is incomplete, as it should test that each type IS what is expected
> > and is NOT everything else.
> >
>
> AFAIK type categorization is about asking if an arbitrary type has
> some properties...
>
> I'm afraid I don't get your point, here. Can you please elaborate ?

Maybe I'm just being pedantic, but I think tests should be as complete
as possible. I have not looked at all tests, but the one I did look at
(is_function_type.cpp) seemed a bit lacking on coverage. Obviously, you
think at least somewhat similarly, because you have...

BOOST_MPL_ASSERT((
  is_function_type<function_reference,my_function_ref>
));

BOOST_MPL_ASSERT_NOT((
  is_function_type<plain_function,my_function_ref>
));

but you are missing several others, including some obvious ones
(assuming I understand is_function_type)...

BOOST_MPL_ASSERT_NOT((
  is_function_type<function_pointer,my_function_ref>
));

BOOST_MPL_ASSERT_NOT((
  is_function_type<member_function_pointer,my_function_ref>
));

I know we can not test EVERYTHING, but we should test everything that
could fail, within reason.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk