Added remove_parens and tests.

This commit is contained in:
Edward Diener
2014-05-03 02:15:47 -04:00
parent dec4cfd273
commit 70e775452a
3 changed files with 52 additions and 0 deletions

View File

@ -23,6 +23,11 @@
# define A_SEQ (r)($)(#)
# define AN_ARRAY (4,(5,7,f,x))
# define A_LIST (e,(g,(&,BOOST_PP_NIL)))
# define DATA (5 + 3) * 4
# define DATA2 4 * (5 + 3)
# define DATA3 4 * (5 + 3) * (2 + 1)
# define DATA4 (5 + 3) * (2 + 1) * 4
// is_begin_parens
@ -39,4 +44,11 @@ BEGIN BOOST_PP_IS_BEGIN_PARENS(AN_ARRAY) == 1 END
BEGIN BOOST_PP_IS_BEGIN_PARENS(A_LIST) == 1 END
BEGIN BOOST_PP_IS_BEGIN_PARENS((y)2(x)) == 1 END
// remove_parens
BEGIN BOOST_PP_REMOVE_PARENS(DATA) == 17 END
BEGIN BOOST_PP_REMOVE_PARENS(DATA2)== 32 END
BEGIN BOOST_PP_REMOVE_PARENS(DATA3)== 96 END
BEGIN BOOST_PP_REMOVE_PARENS(DATA4)== 41 END
#endif