// Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #if !BOOST_WORKAROUND(BOOST_MSVC,<= 1200) MPL_TEST_CASE() { typedef list_c::type l1; typedef list_c::type l2; MPL_ASSERT(( is_same< l1::value_type, bool > )); MPL_ASSERT(( is_same< l2::value_type, bool > )); MPL_ASSERT_RELATION( front::type::value, ==, true ); MPL_ASSERT_RELATION( front::type::value, ==, false ); } #endif MPL_TEST_CASE() { typedef list_c::type l1; typedef list_c::type l2; typedef list_c::type l3; MPL_ASSERT(( is_same< l1::value_type, int > )); MPL_ASSERT(( is_same< l2::value_type, int > )); MPL_ASSERT(( is_same< l3::value_type, int > )); MPL_ASSERT_RELATION( size::value, ==, 1 ); MPL_ASSERT_RELATION( size::value, ==, 2 ); MPL_ASSERT_RELATION( size::value, ==, 3 ); MPL_ASSERT_RELATION( front::type::value, ==, -1 ); MPL_ASSERT_RELATION( front::type::value, ==, 0 ); MPL_ASSERT_RELATION( front::type::value, ==, 1 ); } MPL_TEST_CASE() { typedef list_c::type l1; typedef list_c::type l2; MPL_ASSERT(( is_same< l1::value_type, unsigned > )); MPL_ASSERT(( is_same< l2::value_type, unsigned > )); MPL_ASSERT_RELATION( size::value, ==, 1 ); MPL_ASSERT_RELATION( size::value, ==, 2 ); MPL_ASSERT_RELATION( front::type::value, ==, 0 ); MPL_ASSERT_RELATION( front::type::value, ==, 1 ); } MPL_TEST_CASE() { typedef list_c l2; MPL_ASSERT(( is_same< l2::value_type, unsigned > )); typedef begin::type i1; typedef next::type i2; typedef next::type i3; MPL_ASSERT_RELATION( deref::type::value, ==, 2 ); MPL_ASSERT_RELATION( deref::type::value, ==, 1 ); MPL_ASSERT(( is_same< i3, end::type > )); }