comparison.cxx 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # /* **************************************************************************
  2. # * *
  3. # * (C) Copyright Paul Mensonides 2002.
  4. # * Distributed under the Boost Software License, Version 1.0. (See
  5. # * accompanying file LICENSE_1_0.txt or copy at
  6. # * http://www.boost.org/LICENSE_1_0.txt)
  7. # * *
  8. # ************************************************************************** */
  9. #
  10. # /* See http://www.boost.org for most recent version. */
  11. #
  12. # include <boost/preprocessor/comparison.hpp>
  13. # include <libs/preprocessor/test/test.h>
  14. /* equality */
  15. BEGIN BOOST_PP_EQUAL(2, 0) == 0 END
  16. BEGIN BOOST_PP_EQUAL(2, 2) == 1 END
  17. /* inequality */
  18. BEGIN BOOST_PP_NOT_EQUAL(2, 0) == 1 END
  19. BEGIN BOOST_PP_NOT_EQUAL(2, 2) == 0 END
  20. /* less */
  21. BEGIN BOOST_PP_LESS(2, 1) == 0 END
  22. BEGIN BOOST_PP_LESS(1, 2) == 1 END
  23. /* less_equal */
  24. BEGIN BOOST_PP_LESS_EQUAL(2, 1) == 0 END
  25. BEGIN BOOST_PP_LESS_EQUAL(1, 2) == 1 END
  26. BEGIN BOOST_PP_LESS_EQUAL(2, 2) == 1 END
  27. /* greater */
  28. BEGIN BOOST_PP_GREATER(2, 1) == 1 END
  29. BEGIN BOOST_PP_GREATER(1, 2) == 0 END
  30. /* greater_equal */
  31. BEGIN BOOST_PP_GREATER_EQUAL(2, 1) == 1 END
  32. BEGIN BOOST_PP_GREATER_EQUAL(1, 2) == 0 END
  33. BEGIN BOOST_PP_GREATER_EQUAL(2, 2) == 1 END