-
Notifications
You must be signed in to change notification settings - Fork 51
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
F!! [Boost].UT test framework integration support #58
Conversation
This is great work - thank you very much indeed... Some extra comments apart from the code review:
Thanks again! Clare |
One thing, I caught a bug when compiling UT inside ApprovalTests. It was due to a min macro MSVC adds. I made a pull request on UT: boost-ext/ut#235 |
As for adding UT to the third_party, I recommend waiting for it to stabilize a bit more first. It's fairly new and still being heavily developed. You would have an obsolete version very quickly. |
I understand... I should have explained why... As we maintain Approval Tests, we would like to know that we haven't broken any of our integrations, which means we need to run all our tests, including those of all our integrations, in our CI... In the longer run, I know that we could improve our CMake files a bit, and download dependencies - but for now, the way we do this is via third_party... So having an out-of-date file in third_party is preferable to not running some of our tests... |
Luiz, I should have said, I'm really happy to pair again on any of the remaining bits of this. If that would help, let's set it up by email... |
As for the behaviour when an Approval Test verify fails, the user can just do something like this: expect(nothrow([] {
auto section = NamerFactory::appendToOutputFilename("test 1");
Approvals::verify("Approval Tests can verify text via the golder master method");
})) << "Approval test error"; I can update the docs with that. Or do you have something else in mind? |
As no version of MSVC at the moment support source_location buildins that are required by the [Boost].UT framework, it's disabled for this compiler
I've added more tests. Tomorrow I'll improve the documentation and it should be ok to merge. |
Hi, I've fixed a check on cmakefiles to only compile ut integration with the supported compilers and hand fixed the UsingUT.md documentation (I don't have the software to generate the mds from the source). I fixed the snippets to use from real code now. Should be good to merge. If there's anything else needed to be done to be ready to merge, just ask. |
The tests all pass for me, so I'm accepting this - thanks very much @lp55! Afterwards, I'll pull in the latest ut header, with exception and source_location fixes - and then remove the try/catch block from the tests.. |
Hi @lp55 - it's all looking good! I added a "Minimum C++ Version" column to this table: https://github.com/approvals/ApprovalTests.cpp/blob/master/doc/GettingStarted.md#choosing-a-testing-framework I said C++17 for UT, but then I noticed it now says Should I change the table to say 20, or can the CMake file be changed back to 17? Thanks! |
Hi @claremacrae, Thanks for accepting the pull request! |
Thanks @lp55 - I've updated the table to C++20 and added a footnote explaining why: |
Hi,
This is the initial implementation of the [Boost].UT test framework integration support, developed alongside @claremacrae
I see that I still have to build the tests for the approval tests of the integration with the test framework :) But please take a look to see if anything else is missing and if there are changes needed for what's been done.