-
-
Notifications
You must be signed in to change notification settings - Fork 650
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
std::array doesn't have a default printer. #192
Comments
@DenisYaroshevskiy This isn't currently supported for any container from the STL by doctest - Catch2 does that. I might provide a second header with extensions and provide stringification for the most common containers/STL Types (because the main header will never include any STL/whatever header - the reason doctest compiles so fast). Also default printers for containers is tricky - what if the container has 1 million elements? Would you want a short list of indexes that vary or an entire dump? A one-size-fits-all solution does not exist. You might write your own printers for types. A related issue is printing ENUM values which will also go into such an extension header - see this: #121 |
@onqtam Oh - I see. You do rely on ADL though for looking up types <=> for std ones it's not nice to do so. UPD: Oh - I see -
|
C++11 is the requirement for doctest 2.x (no longer C++98). I think this is how Catch2 detects ranges. I might implement matchers at some point and in that case when comparing containers you would get automatically the index that points to the different elements - this would be very hard to do with the current stringification of the values. But currently I'm focusing on finishing the XML reporter. |
Hi.
For std::array comparison I get:
REQUIRE( {?} == {?} )
I believe you support this for other containers. Can you add this when/if you have the time?
The text was updated successfully, but these errors were encountered: