You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Asserting on top-level structs that contain a data hierarchy works and is very useful.
However, strings are always output as single line strings and I could not find a way to have them output as multi line string literals.
It isn't possible to use assert_str_eq because the struct can't easily implement AsRef.
Any guidance on how to do this, or is this a feature request?
The text was updated successfully, but these errors were encountered:
Agreed this is not currently possible with pretty_assertions. At the moment the Debug representation is used, which for strings is a single line.
I can imagine that this is something that we could implement in the printer layer, but I'm not sure what heuristic you'd want to use for wrapping. You'd also want this to be configurable, and there is open discussion around making the diff output configurable here: #116
@tommilligan, I don't need any wrapping myself, just breaking on newlines is fine. That's also what text editors do by default for raw rust string literals.
Asserting on top-level structs that contain a data hierarchy works and is very useful.
However, strings are always output as single line strings and I could not find a way to have them output as multi line string literals.
It isn't possible to use
assert_str_eq
because the struct can't easily implement AsRef.Any guidance on how to do this, or is this a feature request?
The text was updated successfully, but these errors were encountered: