logical.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright Aleksey Gurtovoy 2000-2004
  2. //
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // (See accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // See http://www.boost.org/libs/mpl for documentation.
  8. // $Id$
  9. // $Date$
  10. // $Revision$
  11. #include <boost/mpl/logical.hpp>
  12. #include <boost/mpl/bool.hpp>
  13. #include <boost/mpl/aux_/test.hpp>
  14. struct unknown;
  15. using mpl::true_;
  16. using mpl::false_;
  17. MPL_TEST_CASE()
  18. {
  19. MPL_ASSERT(( mpl::and_< true_,true_ > ));
  20. MPL_ASSERT_NOT(( mpl::and_< false_,true_ > ));
  21. MPL_ASSERT_NOT(( mpl::and_< true_,false_ > ));
  22. MPL_ASSERT_NOT(( mpl::and_< false_,false_ > ));
  23. MPL_ASSERT_NOT(( mpl::and_< false_,unknown > ));
  24. MPL_ASSERT_NOT(( mpl::and_< false_,unknown,unknown > ));
  25. MPL_ASSERT(( mpl::or_< true_,true_ > ));
  26. MPL_ASSERT(( mpl::or_< false_,true_ > ));
  27. MPL_ASSERT(( mpl::or_< true_,false_ > ));
  28. MPL_ASSERT_NOT(( mpl::or_< false_,false_ > ));
  29. MPL_ASSERT(( mpl::or_< true_,unknown > ));
  30. MPL_ASSERT(( mpl::or_< true_,unknown,unknown > ));
  31. MPL_ASSERT_NOT(( mpl::not_< true_ > ));
  32. MPL_ASSERT(( mpl::not_< false_ > ));
  33. }