1 | |
---|
2 | // Copyright Aleksey Gurtovoy 2003-2004 |
---|
3 | // |
---|
4 | // Distributed under the Boost Software License, Version 1.0. |
---|
5 | // (See accompanying file LICENSE_1_0.txt or copy at |
---|
6 | // http://www.boost.org/LICENSE_1_0.txt) |
---|
7 | // |
---|
8 | // See http://www.boost.org/libs/mpl for documentation. |
---|
9 | |
---|
10 | // $Source: /cvsroot/boost/boost/libs/mpl/test/multiset.cpp,v $ |
---|
11 | // $Date: 2004/09/02 15:41:35 $ |
---|
12 | // $Revision: 1.2 $ |
---|
13 | |
---|
14 | #include <boost/mpl/multiset/multiset0.hpp> |
---|
15 | |
---|
16 | #include <boost/mpl/insert.hpp> |
---|
17 | #include <boost/mpl/count.hpp> |
---|
18 | #include <boost/mpl/aux_/test.hpp> |
---|
19 | |
---|
20 | |
---|
21 | MPL_TEST_CASE() |
---|
22 | { |
---|
23 | typedef multiset0<> s0; |
---|
24 | typedef insert<s0,int>::type s1; |
---|
25 | typedef insert<s1,char&>::type s2; |
---|
26 | typedef insert<s2,int>::type s3; |
---|
27 | typedef insert<s3,abstract>::type s4; |
---|
28 | |
---|
29 | MPL_ASSERT_RELATION( (count<s0,int>::value), ==, 0 ); |
---|
30 | MPL_ASSERT_RELATION( (count<s1,int>::value), ==, 1 ); |
---|
31 | MPL_ASSERT_RELATION( (count<s2,int>::value), ==, 1 ); |
---|
32 | MPL_ASSERT_RELATION( (count<s2,char&>::value), ==, 1 ); |
---|
33 | MPL_ASSERT_RELATION( (count<s3,int>::value), ==, 2 ); |
---|
34 | MPL_ASSERT_RELATION( (count<s3,char&>::value), ==, 1 ); |
---|
35 | MPL_ASSERT_RELATION( (count<s4,abstract>::value), ==, 1 ); |
---|
36 | } |
---|