mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 22:05:39 +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:
@@ -222,6 +222,9 @@
|
||||
<file path="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp">
|
||||
<testCase name="Directly creating an EnumInfo" duration="{duration}"/>
|
||||
<testCase name="Range type with sentinel" duration="{duration}"/>
|
||||
<testCase name="Stringifying char arrays with statically known sizes - char" duration="{duration}"/>
|
||||
<testCase name="Stringifying char arrays with statically known sizes - signed char" duration="{duration}"/>
|
||||
<testCase name="Stringifying char arrays with statically known sizes - unsigned char" duration="{duration}"/>
|
||||
<testCase name="parseEnums/No enums" duration="{duration}"/>
|
||||
<testCase name="parseEnums/One enum value" duration="{duration}"/>
|
||||
<testCase name="parseEnums/Multiple enum values" duration="{duration}"/>
|
||||
|
Reference in New Issue
Block a user