From e2be114f64df94e16d26c281f3a94f4bcc49c8ea Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 21 Aug 2020 20:34:35 +0200 Subject: [trivial] tst_qstringapisymmetry: remove remnants of from() experiment Reduce the scopes so that also the result of 1-arg-sliced() can be called 'sliced'. Change-Id: Ie156f76838f8650d6926d3c198007aaf12f90734 Reviewed-by: Thiago Macieira --- .../qstringapisymmetry/tst_qstringapisymmetry.cpp | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'tests/auto/corelib') diff --git a/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp b/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp index 17d209ce69..bd20c59dde 100644 --- a/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp +++ b/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp @@ -1574,24 +1574,28 @@ void tst_QStringApiSymmetry::sliced_impl() const auto s = make(unicode, latin1, utf8); { - const auto from = s.sliced(pos); - const auto sliced = s.sliced(pos, n); + const auto sliced = s.sliced(pos); - QCOMPARE(from, result); - QCOMPARE(from.isNull(), result.isNull()); - QCOMPARE(from.isEmpty(), result.isEmpty()); + QCOMPARE(sliced, result); + QCOMPARE(sliced.isNull(), result.isNull()); + QCOMPARE(sliced.isEmpty(), result.isEmpty()); + } + { + const auto sliced = s.sliced(pos, n); QCOMPARE(sliced, result2); QCOMPARE(sliced.isNull(), result2.isNull()); QCOMPARE(sliced.isEmpty(), result2.isEmpty()); } { - const auto from = detached(s).sliced(pos); - const auto sliced = detached(s).sliced(pos, n); + const auto sliced = detached(s).sliced(pos); - QCOMPARE(from, result); - QCOMPARE(from.isNull(), result.isNull()); - QCOMPARE(from.isEmpty(), result.isEmpty()); + QCOMPARE(sliced, result); + QCOMPARE(sliced.isNull(), result.isNull()); + QCOMPARE(sliced.isEmpty(), result.isEmpty()); + } + { + const auto sliced = detached(s).sliced(pos, n); QCOMPARE(sliced, result2); QCOMPARE(sliced.isNull(), result2.isNull()); -- cgit v1.2.3