// 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. // $Source$ // $Date$ // $Revision$ #include #include #include #include #include #include MPL_TEST_CASE() { typedef range_c range0; typedef range_c range1; typedef range_c range10; MPL_ASSERT_RELATION( size::value, ==, 0 ); MPL_ASSERT_RELATION( size::value, ==, 1 ); MPL_ASSERT_RELATION( size::value, ==, 10 ); MPL_ASSERT(( empty )); MPL_ASSERT_NOT(( empty )); MPL_ASSERT_NOT(( empty )); MPL_ASSERT(( is_same::type, end::type > )); MPL_ASSERT_NOT(( is_same::type, end::type > )); MPL_ASSERT_NOT(( is_same::type, end::type > )); MPL_ASSERT_RELATION( front::type::value, ==, 0 ); MPL_ASSERT_RELATION( back::type::value, ==, 0 ); MPL_ASSERT_RELATION( front::type::value, ==, 0 ); MPL_ASSERT_RELATION( back::type::value, ==, 9 ); } MPL_TEST_CASE() { typedef range_c range10; typedef begin::type i0; typedef next::type i1; typedef next::type i2; typedef next::type i3; typedef next::type i4; typedef next::type i5; typedef next::type i6; typedef next::type i7; typedef next::type i8; typedef next::type i9; typedef next::type i10; MPL_ASSERT_RELATION( deref::type::value, ==, 0 ); MPL_ASSERT_RELATION( deref::type::value, ==, 1 ); MPL_ASSERT_RELATION( deref::type::value, ==, 2 ); MPL_ASSERT_RELATION( deref::type::value, ==, 3 ); MPL_ASSERT_RELATION( deref::type::value, ==, 4 ); MPL_ASSERT_RELATION( deref::type::value, ==, 5 ); MPL_ASSERT_RELATION( deref::type::value, ==, 6 ); MPL_ASSERT_RELATION( deref::type::value, ==, 7 ); MPL_ASSERT_RELATION( deref::type::value, ==, 8 ); MPL_ASSERT_RELATION( deref::type::value, ==, 9 ); }