diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2018-06-21 10:23:23 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2018-06-25 12:56:09 +0000 |
commit | 0259c67e630d0a39bc65dd85a5de3ba58180cb9d (patch) | |
tree | 8bbd37e35cc184e597a5adc618e18e59a461f9c0 /tests | |
parent | fbbd436bf1aea9522456f0a99196fa724b7c951c (diff) |
Provide an error location for invalid property assignments
... of the form "x.y.z: value", where there is no module x.y. The errors
printed in this case did not have a location, because none of the value
items are proper module instances and we did not keep track of the chain
of parent items.
Change-Id: I2da4da7beb5bd6f6d185a63c90d42340c9e30492
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/language/testdata/erroneous/original-in-export-item2.qbs | 14 | ||||
-rw-r--r-- | tests/auto/language/tst_language.cpp | 3 |
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/language/testdata/erroneous/original-in-export-item2.qbs b/tests/auto/language/testdata/erroneous/original-in-export-item2.qbs new file mode 100644 index 000000000..d932d4aee --- /dev/null +++ b/tests/auto/language/testdata/erroneous/original-in-export-item2.qbs @@ -0,0 +1,14 @@ +import qbs + +Project { + Product { + name: "a" + Export { + x.y.z: original + } + } + Product { + name: "b" + Depends { name: "a" } + } +} diff --git a/tests/auto/language/tst_language.cpp b/tests/auto/language/tst_language.cpp index 3c4637018..a82646e4e 100644 --- a/tests/auto/language/tst_language.cpp +++ b/tests/auto/language/tst_language.cpp @@ -880,6 +880,9 @@ void TestLanguage::erroneousFiles_data() QTest::newRow("original-in-export-item") << "original-in-export-item.qbs:7:32.*The special value 'original' cannot be used " "on the right-hand side of a property declaration."; + QTest::newRow("original-in-export-item2") + << "original-in-export-item2.qbs:6:9.*Item 'x.y' is not declared. Did you forget " + "to add a Depends item"; QTest::newRow("mismatching-multiplex-dependency") << "mismatching-multiplex-dependency.qbs:9:5.*Dependency from product " "'b \\{\"architecture\":\"mips\"\\}' to product 'a \\{\"architecture\":\"mips\"\\}'" |