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>
bb10
Peter Hartmann 2012-12-14 17:49:01 +01:00 committed by The Qt Project
parent 2efccfeeef
commit cc79ed5c6a
1 changed files with 6 additions and 0 deletions

View File

@ -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()