-
-
Notifications
You must be signed in to change notification settings - Fork 799
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
Add support for doctest #4240
Comments
Thanks for the feature request. Please re-test with A new docs will be ready soon at https://docs.platformio.org/en/latest/advanced/unit-testing/frameworks/doctest.html |
@ivankravets Is it possible to use the VS Code GUI to run the tests? For example via the TestMate extension? |
Which features from that extension are the most important for you? You can use that extension for "native executables" but not for the embedded. |
Could I ask you to file a new issue at https://github.com/platformio/platformio-vscode-ide/issues ? I'll provide some hints. Also, please copy your latest comment. |
The "doctest" unit test framework is a variant of "Catch2", but much simpler (and faster). I've been using this on native builds for some time now. For an example, tied into PIO for native, but still using Unity for embedded tests, see https://git.jeelabs.org/monty/tree/test?h=v1.6
See also doctest/doctest#506 which tries to run Doctest on embedded.
The key benefit, as with Catch2, is the amount of info you can see when tests fail, i.e. a test such as
CHECK(abc == 42);
then the actual value of abc will also be reported. Better still, you can capture other expressions tp print out, only on failure. This is such a game-changer that I've been going out of my way to test as much as possible on native (always a good strategy, of course).If nothing else, I would be nice to support mixed doctest/unity testing, but supporting doctest on embedded would be even more powerful.
(This feature request was previously mentioned at #2185 (comment))
The text was updated successfully, but these errors were encountered: