// 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 #include #include MPL_TEST_CASE() { typedef deque<> d0; typedef deque d1; typedef deque d2; typedef deque d9; MPL_ASSERT_RELATION( size::value, ==, 0 ); MPL_ASSERT_RELATION( size::value, ==, 1 ); MPL_ASSERT_RELATION( size::value, ==, 2 ); MPL_ASSERT_RELATION( size::value, ==, 9 ); MPL_ASSERT(( empty )); MPL_ASSERT_NOT(( empty )); MPL_ASSERT_NOT(( empty )); MPL_ASSERT_NOT(( empty )); MPL_ASSERT(( is_same< front::type,char > )); MPL_ASSERT(( is_same< back::type,char > )); MPL_ASSERT(( is_same< front::type,char > )); MPL_ASSERT(( is_same< back::type,long > )); MPL_ASSERT(( is_same< front::type,char > )); MPL_ASSERT(( is_same< back::type,int > )); } MPL_TEST_CASE() { typedef deque d2; typedef begin::type i1; typedef next::type i2; typedef next::type i3; MPL_ASSERT(( is_same::type,char> )); MPL_ASSERT(( is_same::type,long> )); MPL_ASSERT(( is_same< i3, end::type > )); } MPL_TEST_CASE() { typedef deque<> d0; typedef push_back::type d1; MPL_ASSERT(( is_same< back::type,int > )); typedef push_front::type d2; MPL_ASSERT(( is_same< back::type,int > )); MPL_ASSERT(( is_same< front::type,char > )); typedef push_back::type d3; MPL_ASSERT(( is_same< back::type,long > )); } MPL_TEST_CASE() { typedef deque<> d0; typedef deque d1; typedef deque d2; typedef deque d9; MPL_ASSERT_RELATION( size::value, ==, 0 ); MPL_ASSERT_RELATION( size::value, ==, 1 ); MPL_ASSERT_RELATION( size::value, ==, 2 ); MPL_ASSERT_RELATION( size::value, ==, 9 ); }