mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-02 21:35:40 +02:00
Cleanup and optimize stringifying of string-like types
More specifically, made the actual implementation of string-like type handling take argument as `Catch::StringRef`, instead of taking `std::string const&`. This means that string-like types that are not `std::string` no longer need to pay for an extra construction of `std::string` (including the potential allocation), before they can be stringified. The actual string stringification routine is now also better about reserving sufficient space.
This commit is contained in:
@@ -510,6 +510,12 @@ Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringFor
|
||||
##teamcity[testFinished name='StringRef' duration="{duration}"]
|
||||
##teamcity[testStarted name='StringRef at compilation time']
|
||||
##teamcity[testFinished name='StringRef at compilation time' duration="{duration}"]
|
||||
##teamcity[testStarted name='Stringifying char arrays with statically known sizes - char']
|
||||
##teamcity[testFinished name='Stringifying char arrays with statically known sizes - char' duration="{duration}"]
|
||||
##teamcity[testStarted name='Stringifying char arrays with statically known sizes - signed char']
|
||||
##teamcity[testFinished name='Stringifying char arrays with statically known sizes - signed char' duration="{duration}"]
|
||||
##teamcity[testStarted name='Stringifying char arrays with statically known sizes - unsigned char']
|
||||
##teamcity[testFinished name='Stringifying char arrays with statically known sizes - unsigned char' duration="{duration}"]
|
||||
##teamcity[testStarted name='Stringifying std::chrono::duration helpers']
|
||||
##teamcity[testFinished name='Stringifying std::chrono::duration helpers' duration="{duration}"]
|
||||
##teamcity[testStarted name='Stringifying std::chrono::duration with weird ratios']
|
||||
|
Reference in New Issue
Block a user