]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/metaparse/test/size.cpp
f53354df5ca0759d486b997a249a6f03f4600e0b
1 // Copyright Abel Sinkovics (abel@sinkovics.hu) 2013.
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
6 #include <boost/metaparse/v1/impl/size.hpp>
7 #include <boost/metaparse/string.hpp>
9 #include <boost/mpl/equal_to.hpp>
10 #include <boost/mpl/int.hpp>
11 #include <boost/mpl/assert.hpp>
13 #include "test_case.hpp"
15 BOOST_METAPARSE_TEST_CASE(size
)
17 using boost::metaparse::v1::impl::size
;
18 using boost::metaparse::string
;
20 using boost::mpl::equal_to
;
21 using boost::mpl::int_
;
24 BOOST_MPL_ASSERT((equal_to
<int_
<0>, size
<string
<> >::type
>));
27 BOOST_MPL_ASSERT((equal_to
<int_
<1>, size
<string
<'x'> >::type
>));
30 BOOST_MPL_ASSERT((equal_to
<int_
<4>, size
<string
<'1','2','3','4'> >::type
>));