diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2022-05-19 13:48:45 +0200 |
---|---|---|
committer | Ivan Solovev <ivan.solovev@qt.io> | 2022-06-03 22:37:50 +0200 |
commit | 343e0ff485de36e27c0a62781dc512a4bda22fce (patch) | |
tree | 800a71669093a5d9bcd60048f9be9f8badbe0367 /tests/auto/testlib/selftests/generate_expected_output.py | |
parent | 9327d1aaf79d4214db78ec86b8b6df7738bd1875 (diff) |
Add QCOMPARE_{EQ,NE,LT,LE,GT,GE}()
[ChangeLog][QTestLib] Add QCOMPARE_{EQ,NE,LT,LE,GT,GE}()
macros. These new macros behave similarly to QVERIFY(a op b),
where 'op' is ==, !=, <, <=, >, >= respectively, but print
a formatted error message with argument values in case of failure.
The formatting is done lazily, which means that the strings will
be generated only when the comparison fails.
Also add a new test for tst_selftest and generate expected output
for it.
Fixes: QTBUG-98873
Task-number: QTBUG-98874
Change-Id: Ic8074798901d7a469b1f58d5cd28bbf49a3da1db
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/auto/testlib/selftests/generate_expected_output.py')
-rwxr-xr-x | tests/auto/testlib/selftests/generate_expected_output.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/testlib/selftests/generate_expected_output.py b/tests/auto/testlib/selftests/generate_expected_output.py index 5fbfc99567..b1da3fd9fa 100755 --- a/tests/auto/testlib/selftests/generate_expected_output.py +++ b/tests/auto/testlib/selftests/generate_expected_output.py @@ -32,7 +32,7 @@ TESTS = ['assert', 'badxml', 'benchlibcallgrind', 'benchlibcounting', 'benchlibwalltime', 'blacklisted', 'cmptest', 'commandlinedata', 'counting', 'crashes', 'datatable', 'datetime', 'deleteLater', 'deleteLater_noApp', 'differentexec', 'exceptionthrow', 'expectfail', - 'failcleanup', 'faildatatype', 'failfetchtype', 'failinit', + "extendedcompare", 'failcleanup', 'faildatatype', 'failfetchtype', 'failinit', 'failinitdata', 'fetchbogus', 'findtestdata', 'float', 'globaldata', 'longstring', 'maxwarnings', 'mouse', 'multiexec', 'pairdiagnostics', 'pass', 'printdatatags', 'printdatatagswithglobaltags', 'qexecstringlist', |