rules_testing
rules_testing copied to clipboard
Show diff for large objects
When large objects are compared, it makes the resulting errors hard to visually see what the differences are. This occurs with both large strings (e.g. generated BUILD file content for repository rule utilties) and large collections (e.g. the argv of a cc link command).
A diff would help draw attention to the parts of the expects vs actual that actually differ.
+1 for this feature, right now I have to change:
that_str(got).equals(want)
to
that_collection(got.splitlines()).contains_exactly(want.splitlines())
However, this is not really equivalent, as the line endings may interfere with the result.