aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/language/tst_language.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2017-01-05 16:07:15 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2017-01-05 15:16:17 +0000
commitbde133890a445112ae32367bdfaed489174ef3c8 (patch)
tree9c554894ea475e1e50c92ca82372f73455c68e5c /src/lib/corelib/language/tst_language.cpp
parent4bd89e16c155610922165b246e14c15a43102e4a (diff)
Check the type of the top-level item
We neglected to do that so far. If a project's top-level item was not Project or Product, an internal error would be thrown. Change-Id: I7f4ca74107a6bcc990d21f998ae6c5b9732bfb28 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/lib/corelib/language/tst_language.cpp')
-rw-r--r--src/lib/corelib/language/tst_language.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/corelib/language/tst_language.cpp b/src/lib/corelib/language/tst_language.cpp
index 65b0713ea..a72efb36e 100644
--- a/src/lib/corelib/language/tst_language.cpp
+++ b/src/lib/corelib/language/tst_language.cpp
@@ -566,6 +566,9 @@ void TestLanguage::erroneousFiles_data()
<< "Export item in inherited item redeclares property 'theProp' with different type.";
QTest::newRow("invalid-property-option")
<< "PropertyOptions item refers to non-existing property 's0meProp'";
+ QTest::newRow("wrong-toplevel-item")
+ << "wrong-toplevel-item.qbs:3:1.*The top-level item must be of type 'Project' or "
+ "'Product', but it is of type 'Artifact'.";
}
void TestLanguage::erroneousFiles()