Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/mpl/test/logical.cpp @ 12

Last change on this file since 12 was 12, checked in by landauf, 17 years ago

added boost

File size: 1.2 KB
RevLine 
[12]1
2// Copyright Aleksey Gurtovoy 2000-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/logical.cpp,v $
11// $Date: 2004/09/02 15:41:35 $
12// $Revision: 1.5 $
13
14#include <boost/mpl/logical.hpp>
15#include <boost/mpl/bool.hpp>
16#include <boost/mpl/aux_/test.hpp>
17
18struct unknown;
19
20using mpl::true_;
21using mpl::false_;
22
23MPL_TEST_CASE()
24{
25    MPL_ASSERT(( mpl::and_< true_,true_ > ));
26    MPL_ASSERT_NOT(( mpl::and_< false_,true_ > ));
27    MPL_ASSERT_NOT(( mpl::and_< true_,false_ > ));
28    MPL_ASSERT_NOT(( mpl::and_< false_,false_ > ));
29    MPL_ASSERT_NOT(( mpl::and_< false_,unknown > ));
30    MPL_ASSERT_NOT(( mpl::and_< false_,unknown,unknown > ));
31
32    MPL_ASSERT(( mpl::or_< true_,true_ > ));
33    MPL_ASSERT(( mpl::or_< false_,true_ > ));
34    MPL_ASSERT(( mpl::or_< true_,false_ > ));
35    MPL_ASSERT_NOT(( mpl::or_< false_,false_ > ));
36    MPL_ASSERT(( mpl::or_< true_,unknown > ));
37    MPL_ASSERT(( mpl::or_< true_,unknown,unknown > ));
38
39    MPL_ASSERT_NOT(( mpl::not_< true_ > ));
40    MPL_ASSERT(( mpl::not_< false_ > ));
41}
Note: See TracBrowser for help on using the repository browser.