aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto-unexpected-qstringbuilder/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto-unexpected-qstringbuilder/main.cpp')
-rw-r--r--tests/auto-unexpected-qstringbuilder/main.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto-unexpected-qstringbuilder/main.cpp b/tests/auto-unexpected-qstringbuilder/main.cpp
index 5c511d15..a160d315 100644
--- a/tests/auto-unexpected-qstringbuilder/main.cpp
+++ b/tests/auto-unexpected-qstringbuilder/main.cpp
@@ -7,5 +7,13 @@ void test()
const auto s2 = "tests/" % QString::fromLatin1("foo"); // Warning
const QString s3 = "tests/" + QString::fromLatin1("foo"); // OK
const QString s4 = "tests/" % QString::fromLatin1("foo"); // OK
+
+ [] {
+ return "tests/" % QString::fromLatin1("foo"); // Warn
+ };
+
+ [] {
+ return QString(); // OK
+ };
}