Comments (11)
Hi, I happen to be one of the maintainers of ApprovalTests.cpp... Am happy to try and help with this, or answer questions, if I can...
from ut.
Oh, and thank you for trying to make this integration!
from ut.
Hi @claremacrae,
It would be great if you could check things on the ApprovalTests.cpp side. As I said I don't think it's an issue there, but I haven't had time to do a in depth debug.
And thanks for ApprovalTests.cpp! It's a very cool idea and it really fills a need I have in my current project. I have a small patch for TortoiseGitMerge tool support that I'll submit soon.
from ut.
Hi @lp55
You're welcome...
I can reproduce the behaviour you describe, but I can't get a debugger to break in the ApprovalTests code to work out what's going on. It's almost as though it's all being executed at compile time???
from ut.
Are you available to screens-share and pair on this?
from ut.
Hi @claremacrae
I'm available for screen-share depending on the tool. What do you use?
from ut.
Great - How about you email me to [email protected] and we take it from there?
from ut.
We were able to get this working - the key turned out to be that we needed the code that handled ut::events::test_begin
to have access to the filename the test was in... which we were able to get by changing the test_begin
method to this:
auto on(ut::events::test_begin test_begin) -> void {
const std::string fileName =
ut::reflection::source_location::current().file_name();
currentTest.setFileName(fileName);
std::string name = test_begin.name;
currentTest.sections.emplace_back(name);
ApprovalTestNamer::currentTest(¤tTest);
ut::reporter<ut::printer>::on(test_begin);
}
from ut.
In case anyone else wants to look at this in the short term, I've attached a slightly-modified version of what we ended up with - renamed to .txt so I could upload it here.
@lp55 had kindly offered to work it up to something to add to ApprovalTests.cpp, so that it supports ut directly - thank you!
from ut.
Thank you, @lp55 and @claremacrae for your work, very exciting stuff 👍 ApprovalTests looks very interesting and I would love to put a link to the integration between it and it on the website, please keep me in the know when you have something ready so that I can update the website, thanks again 🙏 nice one 👍
from ut.
Closing it for now as there is nothing to do from ut perspective ATM, feel free to reopen the issue and/or ping me with any updates/problems, thanks.
from ut.
Related Issues (20)
- [feature] Add property based testing
- [CMake] Test condition failure line in ut.hpp instead of test source file HOT 7
- Comparing (and printing) char32_t
- piping tuple into a test case enforces const-ness of passed type instances
- running clang-format on ut.hpp in master produces changes?
- 7 tests fail
- Would be nice if the _i operator accepted hex constants HOT 1
- Boost review process
- `using namespace boost::ut;` breaks piping views that are copied to local variable.
- Test crashes in aarch64 built with clang++ HOT 1
- clang-scan-deps fails on ut.hpp
- Tests fail due to global instances destroyed HOT 1
- Leak when a source file starts with an A
- std::cout blocked from printing, is there an option to set?
- Version 2.0.1 segfaults when using std::format and std::cout on multiple threads HOT 24
- aborts support on Windows?
- Tests are always skipped when ut is #included into a module
- Number of asserts is reported wrongly HOT 1
- Fatal expression with custom message compile error HOT 2
- Custom message for fatal expressions not shown
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ut.