diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2016-03-22 15:34:00 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2016-03-22 15:34:00 -0500 |
commit | 0b9a8d08b2ea7d245ffd00ce465e6c859905c547 (patch) | |
tree | b0402bb6cad49c1777cd2aa9f96f2ae4cf133a42 /tests/utils/qt-fixture.h | |
parent | cc2e2265ada413826e199248dee90a19db31b741 (diff) | |
download | ayatana-indicator-display-0b9a8d08b2ea7d245ffd00ce465e6c859905c547.tar.gz ayatana-indicator-display-0b9a8d08b2ea7d245ffd00ce465e6c859905c547.tar.bz2 ayatana-indicator-display-0b9a8d08b2ea7d245ffd00ce465e6c859905c547.zip |
make wait_for_signals() a macro again so that the GTest log messages will give the test file and line number
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>()) |