diff options
author | Jan Arve Sæther <jan-arve.saether@qt.io> | 2019-06-25 14:21:13 +0200 |
---|---|---|
committer | Jan Arve Sæther <jan-arve.saether@qt.io> | 2019-07-01 16:39:51 +0200 |
commit | 5a13eadaa2042e3d43328c3d5b14ca1c6c105a21 (patch) | |
tree | 60fb24c41e1e1e1aa8d0bb05d3ca95337980928d /tests/auto/qml/parserstress | |
parent | c081cbbf6a4727c29b710b8d2bc9ac4eeda87111 (diff) |
Log all errors through testlib if a component has errors
QVERIFY(!comp.isError()) gives very little diagnostics:
FAIL! : tst_foo::bar() '!comp.isError()' returned FALSE
instead we now use
QVERIFY2(!comp.isError(), qPrintable(comp.errorString()))
which outputs:
FAIL! : tst_foo::bar()
'!comp.isError()' returned FALSE.
(file:///data/cppsignal.qml:42 No such file or directory
)
Task-number: QTBUG-75567
Change-Id: If3527cd6cf38284d5a9d24c0ae476210bec53508
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'tests/auto/qml/parserstress')
-rw-r--r-- | tests/auto/qml/parserstress/tst_parserstress.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/auto/qml/parserstress/tst_parserstress.cpp b/tests/auto/qml/parserstress/tst_parserstress.cpp index e32fcabaf3..11851de76e 100644 --- a/tests/auto/qml/parserstress/tst_parserstress.cpp +++ b/tests/auto/qml/parserstress/tst_parserstress.cpp @@ -130,8 +130,7 @@ void tst_parserstress::ecmascript() QCOMPARE(component.errors().at(1).line(), 142); } else { - - QVERIFY(!component.isError()); + QVERIFY2(!component.isError(), qPrintable(component.errorString())); } } |