45 auto remove_spaces = [](std::string to_split) {
46 to_split.erase(std::remove(to_split.begin(), to_split.end(),
' '),
50 return ::testing::ResultOf(remove_spaces, remove_spaces(s));
56 #define EXPECT_EXPANSION(Result, Macro) \
57 EXPECT_THAT("" GMOCK_PP_STRINGIZE(Macro), SameExceptSpaces(Result))
82 TEST(Macros, IsEmpty) {
88 #define GMOCK_PP_INTERNAL_IS_EMPTY_TEST_1
97 TEST(Macros, HeadTail) {
107 TEST(Macros, Parentheses) {
123 TEST(Macros, Increment) {
133 #define JOINER_CAT(a, b) a##b
134 #define JOINER(_N, _Data, _Elem) JOINER_CAT(_Data, _N) = _Elem
136 TEST(Macros, Repeat) {
159 "X0= X1= X2= X3= X4= X5= X6= X7= X8= X9= X10= X11= X12= X13=",
162 "X0= X1= X2= X3= X4= X5= X6= X7= X8= X9= X10= X11= X12= X13= X14=",
165 TEST(Macros, ForEach) {
181 GMOCK_PP_FOR_EACH(
JOINER, X, (
a, b,
c, d, e, f, g, h,
i)));
183 "X0=a X1=b X2=c X3=d X4=e X5=f X6=g X7=h X8=i X9=j",
184 GMOCK_PP_FOR_EACH(
JOINER, X, (
a, b,
c, d, e, f, g, h,
i, j)));
186 "X0=a X1=b X2=c X3=d X4=e X5=f X6=g X7=h X8=i X9=j X10=k",
187 GMOCK_PP_FOR_EACH(
JOINER, X, (
a, b,
c, d, e, f, g, h,
i, j, k)));
189 "X0=a X1=b X2=c X3=d X4=e X5=f X6=g X7=h X8=i X9=j X10=k X11=l",
190 GMOCK_PP_FOR_EACH(
JOINER, X, (
a, b,
c, d, e, f, g, h,
i, j, k, l)));
192 "X0=a X1=b X2=c X3=d X4=e X5=f X6=g X7=h X8=i X9=j X10=k X11=l X12=m",
193 GMOCK_PP_FOR_EACH(
JOINER, X, (
a, b,
c, d, e, f, g, h,
i, j, k, l, m)));
195 "X0=a X1=b X2=c X3=d X4=e X5=f X6=g X7=h X8=i X9=j X10=k X11=l X12=m "
197 GMOCK_PP_FOR_EACH(
JOINER, X, (
a, b,
c, d, e, f, g, h,
i, j, k, l, m, n)));
199 "X0=a X1=b X2=c X3=d X4=e X5=f X6=g X7=h X8=i X9=j X10=k X11=l X12=m "
202 (
a, b,
c, d, e, f, g, h,
i, j, k, l, m, n, o)));
#define EXPECT_EXPANSION(Result, Macro)
#define GMOCK_PP_IS_BEGIN_PARENS(...)
#define GMOCK_PP_HAS_COMMA(...)
expr expr1 expr1 expr1 c expr2 expr1 expr2 expr1 expr2 expr1 expr1 expr1 expr1 c expr2 expr1 expr2 expr1 expr2 expr1 expr1 expr1 expr1 c *expr2 expr1 expr2 expr1 expr2 expr1 expr1 expr1 expr1 c expr2 expr1 expr2 expr1 expr2 expr1 expr1 expr1 expr2 expr1 expr2 expr1 expr1 expr1 expr2 expr1 expr2 expr1 expr1 expr1 c
#define GMOCK_PP_FOR_EACH(_Macro, _Data, _Tuple)
#define GMOCK_PP_IS_EMPTY(...)
#define GMOCK_PP_REPEAT(_Macro, _Data, _N)
TEST(GTestEnvVarTest, Dummy)
#define JOINER(_N, _Data, _Elem)
#define GMOCK_PP_TAIL(...)
#define GMOCK_PP_INTERNAL_IS_EMPTY_TEST_1
#define GMOCK_PP_CAT(_1, _2)
#define GMOCK_PP_NARG(...)
#define GMOCK_PP_REMOVE_PARENS(...)
#define GMOCK_PP_HEAD(...)
#define GMOCK_PP_IF(_Cond, _Then, _Else)
#define GMOCK_PP_NARG0(...)
#define GMOCK_PP_IS_ENCLOSED_PARENS(...)