Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/preprocessor/test/comparison.cpp @ 20

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

added boost

File size: 1.3 KB
Line 
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
15// equality
16
17BEGIN BOOST_PP_EQUAL(2, 0) == 0 END
18BEGIN BOOST_PP_EQUAL(2, 2) == 1 END
19
20// inequality
21
22BEGIN BOOST_PP_NOT_EQUAL(2, 0) == 1 END
23BEGIN BOOST_PP_NOT_EQUAL(2, 2) == 0 END
24
25// less
26
27BEGIN BOOST_PP_LESS(2, 1) == 0 END
28BEGIN BOOST_PP_LESS(1, 2) == 1 END
29
30// less_equal
31
32BEGIN BOOST_PP_LESS_EQUAL(2, 1) == 0 END
33BEGIN BOOST_PP_LESS_EQUAL(1, 2) == 1 END
34BEGIN BOOST_PP_LESS_EQUAL(2, 2) == 1 END
35
36// greater
37
38BEGIN BOOST_PP_GREATER(2, 1) == 1 END
39BEGIN BOOST_PP_GREATER(1, 2) == 0 END
40
41// greater_equal
42
43BEGIN BOOST_PP_GREATER_EQUAL(2, 1) == 1 END
44BEGIN BOOST_PP_GREATER_EQUAL(1, 2) == 0 END
45BEGIN BOOST_PP_GREATER_EQUAL(2, 2) == 1 END
Note: See TracBrowser for help on using the repository browser.