aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/api/testdata/restored-warnings/restored-warnings.qbs14
-rw-r--r--tests/auto/api/tst_api.cpp17
2 files changed, 18 insertions, 13 deletions
diff --git a/tests/auto/api/testdata/restored-warnings/restored-warnings.qbs b/tests/auto/api/testdata/restored-warnings/restored-warnings.qbs
index f6a68f27c..9d4abb757 100644
--- a/tests/auto/api/testdata/restored-warnings/restored-warnings.qbs
+++ b/tests/auto/api/testdata/restored-warnings/restored-warnings.qbs
@@ -4,18 +4,22 @@ Project {
CppApplication {
name: "theProduct"
- property bool moreFiles: false
cpp.blubb: true
files: ["file.cpp", "main.cpp"]
- Group {
- condition: moreFiles
- files: ["blubb.cpp"]
- }
}
Product {
name: "theOtherProduct"
property bool dummy: { throw "this one comes from a thread"; }
}
+
+ Product {
+ name: "aThirdProduct"
+ property bool moreFiles: false
+ Group {
+ condition: moreFiles
+ files: ["blubb.txt"]
+ }
+ }
}
diff --git a/tests/auto/api/tst_api.cpp b/tests/auto/api/tst_api.cpp
index 7726cee15..3816eca2b 100644
--- a/tests/auto/api/tst_api.cpp
+++ b/tests/auto/api/tst_api.cpp
@@ -2738,7 +2738,7 @@ void TestApi::restoredWarnings()
// Re-resolving with changes: Errors come from the re-resolving, stored ones must be suppressed.
QVariantMap overridenValues;
- overridenValues.insert("products.theProduct.moreFiles", true);
+ overridenValues.insert("products.aThirdProduct.moreFiles", true);
setupParams.setOverriddenValues(overridenValues);
job.reset(qbs::Project().setupProject(setupParams, m_logSink, nullptr));
waitForFinished(job.get());
@@ -2748,13 +2748,14 @@ void TestApi::restoredWarnings()
const auto afterErrors = m_logSink->warnings;
for (const qbs::ErrorInfo &e : afterErrors) {
const QString msg = e.toString();
- QVERIFY2(msg.contains("Superfluous version")
- || msg.contains("Property 'blubb' is not declared")
- || msg.contains("blubb.cpp' does not exist")
- || msg.contains("this one comes from a thread")
- || msg.contains("Product 'theOtherProduct' had errors and was disabled")
- || msg.contains("Product 'theProduct' had errors and was disabled"),
- qPrintable(msg));
+ QVERIFY2(
+ msg.contains("Superfluous version") || msg.contains("Property 'blubb' is not declared")
+ || msg.contains("blubb.txt' does not exist")
+ || msg.contains("this one comes from a thread")
+ || msg.contains("Product 'theOtherProduct' had errors and was disabled")
+ || msg.contains("Product 'theThirdProduct' had errors and was disabled")
+ || msg.contains("Product 'theProduct' had errors and was disabled"),
+ qPrintable(msg));
}
m_logSink->warnings.clear();
}