diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2020-08-21 20:34:35 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2020-08-23 10:38:16 +0200 |
commit | e2be114f64df94e16d26c281f3a94f4bcc49c8ea (patch) | |
tree | c67810dce2813d4f1bfb5a191bd54cab64d00a8b /tests/auto/corelib/text/qstringapisymmetry | |
parent | 60dd5451a243253d9f810f9d3cddca4a152f82a7 (diff) |
[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 <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/text/qstringapisymmetry')
-rw-r--r-- | tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
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<String>(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()); |