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

doctest support? #11

Closed
lichray opened this issue May 19, 2019 · 6 comments
Closed

doctest support? #11

lichray opened this issue May 19, 2019 · 6 comments

Comments

@lichray
Copy link

lichray commented May 19, 2019

https://github.com/onqtam/doctest

@isidore
Copy link
Member

isidore commented May 19, 2019

this should be very possible, but would need a doctest expert to pair with. Usually this is a 30-40 minute thing with an expert. Are you that person?

@claremacrae
Copy link
Collaborator

If doing this, I'd suggest first moving the Catch2, GoogleTest and Okra implementations in to a sub-directory, as I hope that this list of supported frameworks will keep on growing...
See https://github.com/approvals/ApprovalTests.cpp/tree/master/ApprovalTests

It looks like doctest does have the ability to listen out for new tests:
https://github.com/onqtam/doctest/blob/master/examples/all_features/reporters_and_listeners.cpp

@zhihaoy
Copy link

zhihaoy commented May 20, 2019

this should be very possible, but would need a doctest expert to pair with. Usually this is a 30-40 minute thing with an expert. Are you that person?

I only have time to use it :)

It looks like doctest does have the ability to listen out for new tests:
https://github.com/onqtam/doctest/blob/master/examples/all_features/reporters_and_listeners.cpp

And DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN, DOCTEST_REGISTER_REPORTER.

@claremacrae
Copy link
Collaborator

Hi, no worries... Thanks very much for the suggestion - and for letting us know about another testing framework.

I really like its promise of faster build times!

claremacrae added a commit that referenced this issue Jul 3, 2019
claremacrae added a commit that referenced this issue Jul 26, 2019
@claremacrae
Copy link
Collaborator

claremacrae commented Jul 26, 2019

Things that I'm aware of that we still need to do

/cygdrive/d/Users/Clare/Documents/Programming/github/ApprovalTests/ApprovalTests.cpp/ApprovalTests/integrations/doctest/DocTestApprovals.h:16:8: warning: 'DocTestApprovalListener' has a field 'DocTestApprovalListener::' whose type uses the anonymous namespace [-Wsubobject-linkage]
struct DocTestApprovalListener : ConsoleReporter
^~~~~~~~~~~~~~~~~~~~~~~
/cygdrive/d/Users/Clare/Documents/Programming/github/ApprovalTests/ApprovalTests.cpp/ApprovalTests/integrations/doctest/DocTestApprovals.h:16:8: warning: 'DocTestApprovalListener' has a base 'doctest::{anonymous}::ConsoleReporter' whose type uses the anonymous namespace [-Wsubobject-linkage]
[ 66%] Linking CXX executable ApprovalTests_DocTest_Tests.exe
[100%] Built target ApprovalTests_DocTest_Tests

  • Re-enable treating warnings as errors in ApprovalTests_DocTest_Tests/CMakeLists.txt
  • Add doctest support to all our documentation
  • Add doctest to the help message for when main is not correctly configured

claremacrae added a commit that referenced this issue Jul 29, 2019
@claremacrae
Copy link
Collaborator

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

No branches or pull requests

4 participants