From eb00ae5d72f23f4627a3c358183437826db6429d Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sat, 18 Jun 2005 20:51:18 +0000 Subject: [PATCH] Improve bug-revealing test. [SVN r29680] --- test/set.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/test/set.cpp b/test/set.cpp index 29c2312..644bd2e 100644 --- a/test/set.cpp +++ b/test/set.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include @@ -167,24 +168,23 @@ MPL_TEST_CASE() template struct test { - typedef typename mpl::begin::type i0; - typedef typename mpl::deref::type t0; - BOOST_MPL_ASSERT((boost::is_same)); - - typedef typename mpl::next::type i1; - typedef typename mpl::deref::type t1; - BOOST_MPL_ASSERT((boost::is_same)); + MPL_ASSERT_RELATION( size::value, ==, 3 ); - typedef typename mpl::next::type i2; - typedef typename mpl::deref::type t2; - BOOST_MPL_ASSERT((boost::is_same)); - - typedef typename mpl::next::type i3; - BOOST_MPL_ASSERT((boost::is_same::type>)); + typedef typename end::type not_found; + BOOST_MPL_ASSERT_NOT(( is_same::type,not_found> )); + BOOST_MPL_ASSERT_NOT(( is_same::type,not_found> )); + BOOST_MPL_ASSERT_NOT(( is_same::type,not_found> )); + BOOST_MPL_ASSERT(( is_same::type,not_found> )); }; MPL_TEST_CASE() { - typedef mpl::set myset; - test y; + typedef mpl::set set_of_1_int; + typedef mpl::begin::type iter_to_1_int; + BOOST_MPL_ASSERT(( is_same< deref::type, int > )); + + typedef mpl::set myset; + + test x; + test y; }