summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Hartmann <phartmann@rim.com>2012-12-14 17:49:01 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-20 01:42:05 +0100
commitcc79ed5c6a4a9a22ce41b9c5df52676784df5f80 (patch)
tree4faecebc8c68a2ab2082f8ae116671b68d35a704
parent2efccfeeef70ebd8a2db2ebccb3c63722ae76e1f (diff)
QUrl auto tests: ensure toEncoded() and toString() match wrt. empty auth
Task-number: QTBUG-8701 Change-Id: I55780a910a0d0996488475f5ce49a240f6223df0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp
index 12bc4cffe7..740e205336 100644
--- a/tests/auto/corelib/io/qurl/tst_qurl.cpp
+++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp
@@ -2734,10 +2734,16 @@ void tst_QUrl::acceptEmptyAuthoritySegments()
QString foo_triple_bar("foo:///bar"), foo_uni_bar("foo:/bar");
QCOMPARE(foo_triple_bar, QUrl(foo_triple_bar).toString());
+ QCOMPARE(foo_triple_bar, QString::fromUtf8(QUrl(foo_triple_bar).toEncoded()));
+
QCOMPARE(foo_uni_bar, QUrl(foo_uni_bar).toString());
+ QCOMPARE(foo_uni_bar, QString::fromUtf8(QUrl(foo_uni_bar).toEncoded()));
QCOMPARE(foo_triple_bar, QUrl(foo_triple_bar, QUrl::StrictMode).toString());
+ QCOMPARE(foo_triple_bar, QString::fromUtf8(QUrl(foo_triple_bar, QUrl::StrictMode).toEncoded()));
+
QCOMPARE(foo_uni_bar, QUrl(foo_uni_bar, QUrl::StrictMode).toString());
+ QCOMPARE(foo_uni_bar, QString::fromUtf8(QUrl(foo_uni_bar, QUrl::StrictMode).toEncoded()));
}
void tst_QUrl::effectiveTLDs_data()