aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/api/tst_api.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/api/tst_api.cpp')
-rw-r--r--tests/auto/api/tst_api.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/api/tst_api.cpp b/tests/auto/api/tst_api.cpp
index 99af1cf52..ef4a6e71c 100644
--- a/tests/auto/api/tst_api.cpp
+++ b/tests/auto/api/tst_api.cpp
@@ -253,6 +253,20 @@ void TestApi::baseProperties()
VERIFY_NO_ERROR(errorInfo);
}
+void TestApi::buildErrorCodeLocation()
+{
+ const qbs::ErrorInfo errorInfo
+ = doBuildProject("build-error-code-location/build-error-code-location.qbs");
+ QVERIFY(errorInfo.hasError());
+ const qbs::ErrorItem errorItem = errorInfo.items().first();
+ QCOMPARE(errorItem.description(),
+ QString("Rule.outputArtifacts must return an array of objects."));
+ const qbs::CodeLocation errorLoc = errorItem.codeLocation();
+ QCOMPARE(QFileInfo(errorLoc.filePath()).fileName(), QString("build-error-code-location.qbs"));
+ QCOMPARE(errorLoc.line(), 9);
+ QCOMPARE(errorLoc.column(), 26);
+}
+
void TestApi::buildGraphLocking()
{
qbs::SetupProjectParameters setupParams