Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ErrorMessagesSpec: make failures easier to read
Old output of `sbt test`: ``` ErrorMessagesSpec: - attr_invalid_switch_inner *** FAILED *** attr_invalid_switch_inner.ksy: /seq/1/size: error: invalid type: expected integer, got CalcBooleanType attr_invalid_switch_inner.ksy: /seq/1/size: error: invalid type: expected integer, got CalcBooleanType did not equal attr_invalid_switch_inner.ksy: /seq/1/size: error: invalid type: expected integer, got CalcBooleanType (SimpleMatchers.scala:34) ``` New output of `sbt test`: ``` ErrorMessagesSpec: - attr_invalid_switch_inner *** FAILED *** [attr_invalid_switch_inner.ksy: /seq/1/size: error: invalid type: expected integer, got CalcBooleanType attr_invalid_switch_inner.ksy: /seq/1/size: error: invalid type: expected integer, got CalcBooleanType ] did not equal [attr_invalid_switch_inner.ksy: /seq/1/size: error: invalid type: expected integer, got CalcBooleanType ] (SimpleMatchers.scala:34) ```
- Loading branch information
f93fa66
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to add some diffing library so we could see pretty-printed diffs like https://lib.rs/crates/pretty_assertions does?
f93fa66
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My point is exactly the opposite. Any kind of pretty printing should happen externally after raw comparison results has been delivered. There are plenty of GUI tools for diffing (including ones in intellij, in vscode, in eclipse) which do a much better job than arbitrary static ASCII output can do. We shouldn't cripple them.