diff options
Diffstat (limited to 'tests/utils/qt-fixture.h')
-rw-r--r-- | tests/utils/qt-fixture.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/utils/qt-fixture.h b/tests/utils/qt-fixture.h index 0f5722b..95b9b14 100644 --- a/tests/utils/qt-fixture.h +++ b/tests/utils/qt-fixture.h @@ -31,6 +31,16 @@ #include <QVariant> #include <QSignalSpy> +#define wait_for_signals(signalSpy,signalsExpected) \ +{ \ + while (signalSpy.size() < signalsExpected) \ + { \ + ASSERT_TRUE(signalSpy.wait()); \ + } \ + \ + ASSERT_EQ(signalsExpected, signalSpy.size()); \ +} + class QtFixture: public GlibFixture { using super = GlibFixture; @@ -46,16 +56,6 @@ public: protected: - void wait_for_signals(QSignalSpy& signalSpy, int signalsExpected) - { - while (signalSpy.size() < signalsExpected) - { - ASSERT_TRUE(signalSpy.wait()); - } - - ASSERT_EQ(signalsExpected, signalSpy.size()); - } - bool qDBusArgumentToMap(QVariant const& variant, QVariantMap& map) { if (variant.canConvert<QDBusArgument>()) |