aboutsummaryrefslogtreecommitdiff
path: root/tests/utils/gtest-qt-print-helpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/utils/gtest-qt-print-helpers.h')
-rw-r--r--tests/utils/gtest-qt-print-helpers.h45
1 files changed, 0 insertions, 45 deletions
diff --git a/tests/utils/gtest-qt-print-helpers.h b/tests/utils/gtest-qt-print-helpers.h
deleted file mode 100644
index 7a0897e..0000000
--- a/tests/utils/gtest-qt-print-helpers.h
+++ /dev/null
@@ -1,45 +0,0 @@
-
-#pragma once
-
-#include <QDBusObjectPath>
-#include <QString>
-#include <QStringList>
-#include <QVariant>
-
-inline QString qVariantToString(const QVariant& variant) {
- QString output;
- QDebug dbg(&output);
- dbg << variant;
- return output;
-}
-
-inline void PrintTo(const QVariant& variant, std::ostream* os) {
- QString output;
- QDebug dbg(&output);
- dbg << variant;
-
- *os << "QVariant(" << output.toStdString() << ")";
-}
-
-inline void PrintTo(const QString& s, std::ostream* os) {
- *os << "\"" << s.toStdString() << "\"";
-}
-
-inline void PrintTo(const QStringList& list, std::ostream* os) {
- QString output;
- QDebug dbg(&output);
- dbg << list;
-
- *os << "QStringList(" << output.toStdString() << ")";
-}
-
-inline void PrintTo(const QList<QDBusObjectPath>& list, std::ostream* os) {
- QString output;
- for (const auto& path: list)
- {
- output.append("\"" + path.path() + "\",");
- }
-
- *os << "QList<QDBusObjectPath>(" << output.toStdString() << ")";
-}
-