From cc79ed5c6a4a9a22ce41b9c5df52676784df5f80 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Fri, 14 Dec 2012 17:49:01 +0100 Subject: QUrl auto tests: ensure toEncoded() and toString() match wrt. empty auth Task-number: QTBUG-8701 Change-Id: I55780a910a0d0996488475f5ce49a240f6223df0 Reviewed-by: Thiago Macieira --- tests/auto/corelib/io/qurl/tst_qurl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/auto') 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() -- cgit v1.2.3