diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2017-06-22 16:14:35 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2017-06-22 15:05:48 +0000 |
commit | 7e0191856b3c76517a2654183b52192713ff5770 (patch) | |
tree | bbad0dd36d552f572d9faade7350dae8736f3f34 /tests/auto/api/tst_api.cpp | |
parent | 59bbb6ffe0a4529b7a87538550b63bb63563613b (diff) |
Executor: Do not convert error objects into stringsv1.8.1
Command line users do not see a difference, but for IDE users it is
important that we keep error message and code location separate in the
ErrorInfo objects we hand out via the API.
Task-number: QBS-1151
Change-Id: I4aacf2f32ee535c2d37da3d615ab78e2777a351a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests/auto/api/tst_api.cpp')
-rw-r--r-- | tests/auto/api/tst_api.cpp | 14 |
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 |