// 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 #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< begin::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 r; typedef begin::type first; typedef end::type last; MPL_ASSERT(( is_same< advance_c::type, last > )); MPL_ASSERT(( is_same< advance_c::type, first > )); MPL_ASSERT_RELATION( ( mpl::distance::value ), ==, 10 ); typedef advance_c::type iter; MPL_ASSERT_RELATION( deref::type::value, ==, 5 ); }