mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 22:05:39 +02:00
Catch exceptions from StringMakers inside Detail::stringify
This stops tests failing falsely if the assertion passed, but the stringification itself failed as the assertion was sent to the reporter. I don't think that stringification should be fallible, but the overhead in compilation ended up being small enough (<0.5% on `SelfTest`) that it might be worth implementing, in case there is more users with weird `StringMaker`s than just MongoDB. Closes #2980
This commit is contained in:
@@ -2796,6 +2796,8 @@ ok {test-number} - with 1 message: 'sr1.size() == 3'
|
||||
ok {test-number} - with 1 message: 'sr2.empty()'
|
||||
# StringRef at compilation time
|
||||
ok {test-number} - with 1 message: 'sr2.size() == 0'
|
||||
# Stringifying bla bla bla
|
||||
ok {test-number} - tos == tos for: { stringification failed with an exception: "Invalid" } == { stringification failed with an exception: "Invalid" }
|
||||
# Stringifying char arrays with statically known sizes - char
|
||||
ok {test-number} - ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc""
|
||||
# Stringifying char arrays with statically known sizes - char
|
||||
@@ -4592,5 +4594,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0
|
||||
ok {test-number} -
|
||||
# xmlentitycheck
|
||||
ok {test-number} -
|
||||
1..2303
|
||||
1..2304
|
||||
|
||||
|
Reference in New Issue
Block a user