]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/spirit/classic/phoenix/test/new_test.cpp
1 /*=============================================================================
3 Copyright (c) 2001-2003 Joel de Guzman
4 Copyright (c) 2003 Vaclav Vesely
6 Use, modification and distribution is subject to the Boost Software
7 License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8 http://www.boost.org/LICENSE_1_0.txt)
9 ==============================================================================*/
12 #define PHOENIX_LIMIT 15
13 #include <boost/spirit/include/phoenix1_primitives.hpp>
14 #include <boost/spirit/include/phoenix1_new.hpp>
16 #include <boost/core/lightweight_test.hpp>
18 using namespace phoenix
;
31 ///////////////////////////////////////////////////////////////////////////////
38 BOOST_TEST(new_
<int>()() != NULL
);
39 BOOST_TEST(*new_
<int>(arg1
)(i2
) == 2);
41 BOOST_TEST(new_
<X
>()() != NULL
);
42 BOOST_TEST(new_
<X
>()()->i
== 1);
43 BOOST_TEST(new_
<X
>(arg1
)(i2
)->i
== 2);
44 BOOST_TEST(new_
<X
>(arg1
)(x3
)->i
== 3);
46 return boost::report_errors();