diff options
author | Ted Gould <ted@gould.cx> | 2015-03-09 11:28:23 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2015-03-09 11:28:23 -0500 |
commit | 0bfd7482c9af44928e884340f4d06e2162933337 (patch) | |
tree | 3abf8e46567cbf5b2b097259a4e9477a619733da | |
parent | f6776a30db54d274d1918df5f5bacf41e1945530 (diff) | |
download | ayatana-indicator-messages-0bfd7482c9af44928e884340f4d06e2162933337.tar.gz ayatana-indicator-messages-0bfd7482c9af44928e884340f4d06e2162933337.tar.bz2 ayatana-indicator-messages-0bfd7482c9af44928e884340f4d06e2162933337.zip |
This commit might be evil
-rw-r--r-- | tests/indicator-fixture.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/indicator-fixture.h b/tests/indicator-fixture.h index 0747842..d5aa570 100644 --- a/tests/indicator-fixture.h +++ b/tests/indicator-fixture.h @@ -510,6 +510,22 @@ class IndicatorFixture : public ::testing::Test }; return expectEventually(func); } + + /* Eventually Helpers */ + #define _EVENTUALLY_HELPER(oper) \ + template <typename... Args> testing::AssertionResult expectEventually##oper (Args&& ... args) { \ + std::function<testing::AssertionResult(void)> func = [&]() { \ + return testing::internal::CmpHelper##oper(std::forward<Args>(args)...); \ + }; \ + return expectEventually(func); \ + } + + _EVENTUALLY_HELPER(EQ); + _EVENTUALLY_HELPER(NE); + _EVENTUALLY_HELPER(LT); + _EVENTUALLY_HELPER(GT); + _EVENTUALLY_HELPER(STREQ); + _EVENTUALLY_HELPER(STRNE); }; /* Menu Attrib */ @@ -562,3 +578,22 @@ class IndicatorFixture : public ::testing::Test #define EXPECT_EVENTUALLY_ACTION_ACTIVATION_TYPE(action, type) \ EXPECT_PRED_FORMAT2(IndicatorFixture::expectEventuallyActionActivationType, action, type) +/* Helpers */ + +#define EXPECT_EVENTUALLY_EQ(expected, actual) \ + EXPECT_PRED_FORMAT2(IndicatorFixture::expectEventuallyEQ, expected, actual) + +#define EXPECT_EVENTUALLY_NE(expected, actual) \ + EXPECT_PRED_FORMAT2(IndicatorFixture::expectEventuallyNE, expected, actual) + +#define EXPECT_EVENTUALLY_LT(expected, actual) \ + EXPECT_PRED_FORMAT2(IndicatorFixture::expectEventuallyLT, expected, actual) + +#define EXPECT_EVENTUALLY_GT(expected, actual) \ + EXPECT_PRED_FORMAT2(IndicatorFixture::expectEventuallyGT, expected, actual) + +#define EXPECT_EVENTUALLY_STREQ(expected, actual) \ + EXPECT_PRED_FORMAT2(IndicatorFixture::expectEventuallySTREQ, expected, actual) + +#define EXPECT_EVENTUALLY_STRNE(expected, actual) \ + EXPECT_PRED_FORMAT2(IndicatorFixture::expectEventuallySTRNE, expected, actual) |