diff options
author | Leander Beernaert <leander.beernaert@qt.io> | 2019-11-14 13:03:46 +0100 |
---|---|---|
committer | Leander Beernaert <leander.beernaert@qt.io> | 2019-11-19 13:53:21 +0100 |
commit | 26e876912435bdafbca2b425af43824d7ec5b876 (patch) | |
tree | b7ee83cdd9de18ce5970bab0bb217a972d3d2445 /tests/auto/corelib/text/qstringref | |
parent | 7a6c6da2ebbfef33f7284ce5c96aa0c3acabc6bc (diff) | |
parent | bac999f38ca10147832846f6d7df1e4a051d3760 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: Ifecc2d9db396d783124df8567553ba5f846f30bb
Diffstat (limited to 'tests/auto/corelib/text/qstringref')
-rw-r--r-- | tests/auto/corelib/text/qstringref/tst_qstringref.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/corelib/text/qstringref/tst_qstringref.cpp b/tests/auto/corelib/text/qstringref/tst_qstringref.cpp index 6f01947131..20d5426bf7 100644 --- a/tests/auto/corelib/text/qstringref/tst_qstringref.cpp +++ b/tests/auto/corelib/text/qstringref/tst_qstringref.cpp @@ -87,6 +87,7 @@ private slots: void mid(); void split_data(); void split(); + void nullToString(); }; static QStringRef emptyRef() @@ -2177,6 +2178,18 @@ void tst_QStringRef::split() } } +void tst_QStringRef::nullToString() +{ + QStringRef nullRef; + QVERIFY(nullRef.isNull()); + QVERIFY(nullRef.toString().isNull()); + + QString str; + nullRef = &str; + QVERIFY(nullRef.isNull()); + QVERIFY(nullRef.toString().isNull()); +} + QTEST_APPLESS_MAIN(tst_QStringRef) #include "tst_qstringref.moc" |