From bd74588539d8a5922e9f51eb691052c06c02a5ed Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Wed, 22 Jul 2020 18:38:55 +0200 Subject: quotest: Minor refactoring of basic URI tests --- tests/quotest.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/quotest.cpp b/tests/quotest.cpp index 4663d34a..ae272622 100644 --- a/tests/quotest.cpp +++ b/tests/quotest.cpp @@ -664,22 +664,19 @@ TEST_IMPL(visitResources) }; // Basic tests - QUrl invalidUrl { "https://" }; - invalidUrl.setAuthority("---:@@@"); - const Uri emptyUri {}, uriFromEmptyUrl {}, - bareSigil { QStringLiteral("#") }, - invalidMatrixUri { QStringLiteral("matrix:&invalid@") }, - matrixUriFromInvalidUrl { invalidUrl }; - - for (const auto& u: { emptyUri, uriFromEmptyUrl }) + for (const auto& u: { Uri {}, Uri { QUrl {} } }) if (u.isValid() || !u.isEmpty()) { clog << "Empty Matrix URI test failed" << endl; FAIL_TEST(); } - if (bareSigil.isValid()) { + if (Uri { QStringLiteral("#") }.isValid()) { clog << "Bare sigil URI test failed" << endl; FAIL_TEST(); } + QUrl invalidUrl { "https://" }; + invalidUrl.setAuthority("---:@@@"); + const Uri matrixUriFromInvalidUrl { invalidUrl }, + invalidMatrixUri { QStringLiteral("matrix:&invalid@") }; if (matrixUriFromInvalidUrl.isEmpty() || matrixUriFromInvalidUrl.isValid()) { clog << "Invalid Matrix URI test failed" << endl; FAIL_TEST(); -- cgit v1.2.3