Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If using Catch2, prevent QCOMPARE and similar from being used #6

Open
claremacrae opened this issue Sep 15, 2020 · 1 comment
Open

Comments

@claremacrae
Copy link
Contributor

Users need to know to avoid Qt Test macros in this project: QCOMPARE, QVERIFY, QTRY_COMPARE and so on

This is because any test failures will be silently swallowed, when the main() is written for Catch2 and not QtTest.

So tests will spuriously pass.

Fabial Kosmale at Qt provided some sample code to detect this at compile-time, which I have added here:

claremacrae/supercollider/testsuite/editors/sc-ide/common_test_code/safe_qcompare.h

claremacrae added a commit that referenced this issue Nov 10, 2020
This code was written by Fabian Kosmale at Qt in November 2019.
It does not detect use of QVERIFY, QTRY_COMPARE and so on.
claremacrae added a commit that referenced this issue Sep 8, 2021
@claremacrae
Copy link
Contributor Author

There is a partial implementation of this, for QCOMPARE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant