diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/io/qdebug/tst_qdebug.cpp | 10 | ||||
-rw-r--r-- | tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp | 8 |
2 files changed, 14 insertions, 4 deletions
diff --git a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp index 72412aa44d..0b54f53517 100644 --- a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp +++ b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp @@ -35,11 +35,13 @@ #include <QtConcurrentRun> #include <QFutureSynchronizer> -static_assert(QTypeTraits::has_ostream_v<QDebug, int>); -static_assert(QTypeTraits::has_ostream_v<QDebug, QList<int>>); +static_assert(QTypeTraits::has_ostream_operator_v<QDebug, int>); +static_assert(QTypeTraits::has_ostream_operator_v<QDebug, QList<int>>); +static_assert(QTypeTraits::has_ostream_operator_v<QDebug, QMap<int, QString>>); struct NonStreamable {}; -static_assert(!QTypeTraits::has_ostream_v<QDebug, NonStreamable>); -static_assert(!QTypeTraits::has_ostream_v<QDebug, QList<NonStreamable>>); +static_assert(!QTypeTraits::has_ostream_operator_v<QDebug, NonStreamable>); +static_assert(!QTypeTraits::has_ostream_operator_v<QDebug, QList<NonStreamable>>); +static_assert(!QTypeTraits::has_ostream_operator_v<QDebug, QMap<int, NonStreamable>>); class tst_QDebug: public QObject { diff --git a/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp b/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp index 932c4d25d2..bd7100adec 100644 --- a/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp +++ b/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp @@ -36,6 +36,14 @@ #include <QtGui/QPixmap> #include <QtGui/QTextLength> +static_assert(QTypeTraits::has_ostream_operator_v<QDataStream, int>); +static_assert(QTypeTraits::has_ostream_operator_v<QDataStream, QList<int>>); +static_assert(QTypeTraits::has_ostream_operator_v<QDataStream, QMap<int, QString>>); +struct NonStreamable {}; +static_assert(!QTypeTraits::has_ostream_operator_v<QDataStream, NonStreamable>); +static_assert(!QTypeTraits::has_ostream_operator_v<QDataStream, QList<NonStreamable>>); +static_assert(!QTypeTraits::has_ostream_operator_v<QDataStream, QMap<int, NonStreamable>>); + class tst_QDataStream : public QObject { Q_OBJECT |