diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2021-04-15 18:46:45 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-04-16 21:49:01 +0000 |
commit | 315975335816314c849c7d6fa914800d16ff719b (patch) | |
tree | cd795d9633d65d71ba5bc556aca956dfb9f8d559 /tests/auto/corelib | |
parent | 721f582e5b016cd2118275f2a706bed4e3f459d4 (diff) |
tst_qcborstreamwriter: don't pass char8_t strings to QByteArray
There isn't a QByteArray constructor taking a char8_t*. (I am not
sure if there should be one; QByteArray is not going to anything
special about that information anyways.)
Change such strings to be "ordinary" narrow string literals.
There should be no problems at doing so, as by default we build in
UTF-8 mode under all compilers.
Change-Id: Ia200ec6e3b0453bad033d5d8ff34c013bb27abd1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b9d0fd3a09c23b410bb8ef228ff5326d118f3069)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r-- | tests/auto/corelib/serialization/qcborstreamwriter/tst_qcborstreamwriter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/corelib/serialization/qcborstreamwriter/tst_qcborstreamwriter.cpp b/tests/auto/corelib/serialization/qcborstreamwriter/tst_qcborstreamwriter.cpp index 40e9291a13..7718fece7c 100644 --- a/tests/auto/corelib/serialization/qcborstreamwriter/tst_qcborstreamwriter.cpp +++ b/tests/auto/corelib/serialization/qcborstreamwriter/tst_qcborstreamwriter.cpp @@ -191,7 +191,7 @@ void tst_QCborStreamWriter::nonAsciiStrings_data() QTest::addColumn<QString>("input"); QTest::addColumn<bool>("isLatin1"); - QByteArray latin1 = u8"Résumé"; + QByteArray latin1 = "Résumé"; QTest::newRow("shortlatin1") << ("\x68" + latin1) << QString::fromUtf8(latin1) << true; @@ -200,7 +200,7 @@ void tst_QCborStreamWriter::nonAsciiStrings_data() QTest::newRow("longlatin1") << ("\x78\x28" + latin1) << QString::fromUtf8(latin1) << true; - QByteArray nonlatin1 = u8"Χαίρετε"; + QByteArray nonlatin1 = "Χαίρετε"; QTest::newRow("shortnonlatin1") << ("\x6e" + nonlatin1) << QString::fromUtf8(nonlatin1) << false; |