forked from boostorg/preprocessor
Fixes for empty conversions and tests for empty conversions.
This commit is contained in:
15
test/seq.cxx
15
test/seq.cxx
@ -19,8 +19,11 @@
|
||||
# include <boost/preprocessor/facilities/is_empty.hpp>
|
||||
# include <boost/preprocessor/seq.hpp>
|
||||
# include <boost/preprocessor/array/elem.hpp>
|
||||
# include <boost/preprocessor/array/size.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
# include <boost/preprocessor/list/at.hpp>
|
||||
# include <boost/preprocessor/list/size.hpp>
|
||||
# include <boost/preprocessor/variadic/elem.hpp>
|
||||
# include <libs/preprocessor/test/test.h>
|
||||
|
||||
@ -55,8 +58,19 @@ BEGIN BOOST_PP_SEQ_FOR_EACH(F1, 1, SEQ) == 16 END
|
||||
BEGIN BOOST_PP_SEQ_FOR_EACH_I(FI2, 1, SEQ) == 21 END
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_ELEM(4, 3, BOOST_PP_SEQ_TO_TUPLE(SEQ)) == 2 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_TUPLE_ELEM(1, 0, BOOST_PP_SEQ_TO_TUPLE(SEQ_NONE))) == 1 END
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_SEQ_TO_TUPLE(SEQ_NONE)) == 1 END
|
||||
|
||||
#endif
|
||||
|
||||
BEGIN BOOST_PP_ARRAY_ELEM(3, BOOST_PP_SEQ_TO_ARRAY(SEQ)) == 2 END
|
||||
|
||||
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_ARRAY_ELEM(0, BOOST_PP_SEQ_TO_ARRAY(SEQ_NONE))) == 1 END
|
||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_SEQ_TO_ARRAY(SEQ_NONE)) == 1 END
|
||||
|
||||
# define LESS_S(s, x, y) BOOST_PP_LESS(x, y)
|
||||
BEGIN BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_FILTER(LESS_S, 3, SEQ)) == 45 END
|
||||
|
||||
@ -101,6 +115,7 @@ BEGIN BOOST_PP_SEQ_SIZE(BOOST_PP_SEQ_TAIL(BOOST_PP_SEQ_FOLD_LEFT(SEQ_APPEND, (~)
|
||||
|
||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_SEQ_TO_LIST(SEQ), 2) == 5 END
|
||||
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_LIST_AT(BOOST_PP_SEQ_TO_LIST(SEQ_NONE),0)) == 1 END
|
||||
BEGIN BOOST_PP_LIST_SIZE(BOOST_PP_SEQ_TO_LIST(SEQ_NONE)) == 1 END
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
|
Reference in New Issue
Block a user