1 2 // Copyright Aleksey Gurtovoy 2003-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 // $Id$ 11 // $Date$ 12 // $Revision$ 13 14 #include <boost/mpl/aux_/preprocessor/token_equal.hpp> 15 16 #include <boost/preprocessor/logical/not.hpp> 17 #include <boost/preprocessor/debug/assert.hpp> 18 19 #define AUX_ASSERT_EQUAL(x, y) \ 20 BOOST_PP_ASSERT( BOOST_MPL_PP_TOKEN_EQUAL(x, y) ) \ 21 /**/ 22 23 #define AUX_ASSERT_NOT_EQUAL(x, y) \ 24 BOOST_PP_ASSERT( BOOST_PP_NOT( BOOST_MPL_PP_TOKEN_EQUAL(x, y) ) ) \ 25 /**/ 26 27 #define BOOST_MPL_PP_TOKEN_EQUAL_apple(x) x 28 #define BOOST_MPL_PP_TOKEN_EQUAL_orange(x) x 29 30 AUX_ASSERT_NOT_EQUAL( apple, abc ) 31 AUX_ASSERT_NOT_EQUAL( abc, apple ) 32 AUX_ASSERT_NOT_EQUAL( apple, orange ) 33 AUX_ASSERT_NOT_EQUAL( orange, apple ) 34 35 AUX_ASSERT_EQUAL( apple, apple ) 36 AUX_ASSERT_EQUAL( orange, orange ) 37