// 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 #if !BOOST_WORKAROUND(BOOST_MSVC, <=1200) MPL_TEST_CASE() { typedef vector_c::type v1; typedef vector_c::type v2; MPL_ASSERT(( is_same< v1::value_type, bool > )); MPL_ASSERT(( is_same< v2::value_type, bool > )); MPL_ASSERT_RELATION( front::type::value, ==, true ); MPL_ASSERT_RELATION( front::type::value, ==, false ); } #endif MPL_TEST_CASE() { typedef vector_c v1; typedef vector_c v2; typedef vector_c v3; MPL_ASSERT(( is_same< v1::value_type, int > )); MPL_ASSERT(( is_same< v2::value_type, int > )); MPL_ASSERT(( is_same< v3::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 vector_c v1; typedef vector_c v2; MPL_ASSERT(( is_same< v1::value_type, unsigned > )); MPL_ASSERT(( is_same< v2::value_type, unsigned > )); MPL_ASSERT_RELATION( size::type::value, ==, 1 ); MPL_ASSERT_RELATION( size::type::value, ==, 2 ); MPL_ASSERT_RELATION( front::type::value, ==, 0 ); MPL_ASSERT_RELATION( front::type::value, ==, 1 ); }