Comments (7)
Hi Wichert,
AFAIK all local variables that Catch uses have fairly obfuscated names (for exactly this reason) - usually including a catch based prefix and line number too. Obviously if I've missed any I'd like to know about it (and fix it).
Could you try and boil your case down to the smallest thing that demonstrates the problem and post it here.
Thanks for the feedback.
from catch2.
Actually I just had a feeling I might know where the variable you're talking about might be. Had a quick look and, sure enough, there it is. It's in a scope entirely controlled by Catch, so technically it is safe.
However I can see why it produces the warning you're seeing. Not sure why it might make your tests fail, though.
I'll push a fix up later today.
Thanks again for letting me know.
from catch2.
I checked in that change. There were actually three undecorated names that I found (incuding 'action'). All should have been safely within inner-scopes - but at least for the sake of warnings I've now prefixed them.
Please let me know if this fixes the issue for you.
However, if you did manage to get a boiled down example of it causing a test to fail I'd still be very interested to know - not least so I could add it to the self-test suite.
from catch2.
I'll try later this week. A somewhat related question: when moving to
the latest catch version it is attractive to use the single-include
method, but I didn't see any documentation on how to do the equivalent
of using catch_with_main.hpp vs catch.hpp using it. Can you add that to
the documetation?
Wichert Akkerman [email protected] It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
from catch2.
The docs need an overhaul + extending (the latter being the main reason for the former!).
But the single-header related stuff is pretty important so, thanks to your prompting, I've made a small update to reflect that.
from catch2.
Hi @wichert - have you had a chance to verify this fix (and the docs)?
from catch2.
I'm going to close this issue for now as my own view is that the issue is resolved. If you see any other name clashes please reopen (is that even possible with GitHub's system?) or just log a new issue.
Thanks again for reporting it.
from catch2.
Related Issues (20)
- Update documentation for v3 HOT 2
- Provide Catch2's StringMaker specialization behind extra level of indirection
- Handle ANSI escape sequences during text wrapping
- Bring back Single-Header capability HOT 2
- AddressSanitizer reports container overflow during benchmarking HOT 3
- Latest macOS system header causes compilation failures on GCC HOT 4
- Compilation fails with `error: arithmetic on a pointer to an incomplete type` HOT 1
- Combine test filters with filenames HOT 2
- Section filter command line option only works for sections without whitespace in name HOT 1
- Separate headers for "extra" std types
- Catch2 does not appear to work with C++23
- version 3.5.4 does not compile
- JUnit and console reporter discrepency.
- Provide means to obtain current test case name and current section name HOT 1
- GENERATOR doesn't allow use constants HOT 1
- Memory leak when using exit()
- Compile Error While using Catch::Clara::Parser HOT 1
- Allow the Catch2 library to be compiled with address sanitizer enabled
- Fixture's destructor called before retrieving uncaught exception's message
- How does (can) auto-registration work?
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 catch2.