diff options
author | Abseil Team <absl-team@google.com> | 2020-02-07 21:09:11 (GMT) |
---|---|---|
committer | Andy Getz <durandal@google.com> | 2020-02-07 23:20:45 (GMT) |
commit | 41b5f149ab306e96b5b2faf523505d75acffd98a (patch) | |
tree | 4277d57b73935ea47f80a5ad9b8e611f891c4051 /googlemock/include/gmock/internal | |
parent | 2d6d7a01c9ce9d7aded4106890ba2352e586c54a (diff) | |
download | googletest-41b5f149ab306e96b5b2faf523505d75acffd98a.zip googletest-41b5f149ab306e96b5b2faf523505d75acffd98a.tar.gz googletest-41b5f149ab306e96b5b2faf523505d75acffd98a.tar.bz2 |
Googletest export
Get rid of gmock-generated-matchers.h and gmock-generated-matchers.h.pump.
Stop using pump for MATCHER* macroses generation.
PiperOrigin-RevId: 293878808
Diffstat (limited to 'googlemock/include/gmock/internal')
-rw-r--r-- | googlemock/include/gmock/internal/gmock-pp.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/googlemock/include/gmock/internal/gmock-pp.h b/googlemock/include/gmock/internal/gmock-pp.h index c3759f6..d13e75f 100644 --- a/googlemock/include/gmock/internal/gmock-pp.h +++ b/googlemock/include/gmock/internal/gmock-pp.h @@ -86,6 +86,14 @@ #define GMOCK_PP_IF(_Cond, _Then, _Else) \ GMOCK_PP_CAT(GMOCK_PP_INTERNAL_IF_, _Cond)(_Then, _Else) +// Similar to GMOCK_PP_IF but takes _Then and _Else in parentheses. +// +// GMOCK_PP_GENERIC_IF(1, (a, b, c), (d, e, f)) => a, b, c +// GMOCK_PP_GENERIC_IF(0, (a, b, c), (d, e, f)) => d, e, f +// +#define GMOCK_PP_GENERIC_IF(_Cond, _Then, _Else) \ + GMOCK_PP_REMOVE_PARENS(GMOCK_PP_IF(_Cond, _Then, _Else)) + // Evaluates to the number of arguments after expansion. Identifies 'empty' as // 0. // |