]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/phoenix/test/operator/logical_tests.cpp
1 /*=============================================================================
2 Copyright (c) 2001-2007 Joel de Guzman
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7 #include <boost/detail/lightweight_test.hpp>
8 #include <boost/phoenix/core.hpp>
9 #include <boost/phoenix/operator.hpp>
11 namespace phoenix
= boost::phoenix
;
16 using phoenix::arg_names::arg1
;
17 using phoenix::arg_names::arg2
;
22 BOOST_TEST((!arg1
)(x
) == true);
23 BOOST_TEST((!arg1
)(y
) == false);
24 BOOST_TEST((arg1
|| arg2
)(x
, y
) == true);
25 BOOST_TEST((arg1
&& arg2
)(x
, y
) == false);
29 (arg1
|| (arg2
= 4567))(y
, i
);
30 BOOST_TEST(i
== 1234);
31 (arg1
&& (arg2
= 4567))(y
, i
);
32 BOOST_TEST(i
== 4567);
35 return boost::report_errors();