commit | a474ac143488eec90bf6a6644b55b3250c4398fd | [log] [tgz] |
---|---|---|
author | peteg <peteg@google.com> | Mon Jan 07 03:43:14 2019 -0800 |
committer | Ron Shapiro <shapiro.rd@gmail.com> | Tue Jan 08 14:12:22 2019 -0500 |
tree | dcee9a37aae4c16c7919247de707268ae8607ba7 | |
parent | bd86b71b3ea9444b02f877e7fec6607e0019a3bf [diff] |
Handle exceptions from Correspondence.compare in the Fuzzy Truth assertions implemented directly in MultimapSubject. They were already handled in containsExactly(EntriesIn) because those methods delegate to IterableSubject which handled them. However, this CL does add some tests for those (because at some point we plan to implement them directly in MultimapSubject to improve the failure messages, and it would be good to have the test cases in place before we do that). This completes the work for Correspondence.compare. There's still work to do for exceptions from Correspondence.formatDiff, and from the function used to pair elements for diffing. RELNOTES=All Fuzzy Truth assertions now handle exceptions thrown by Correspondence.compare (see the javadoc of that method for details). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=228137650
Truth makes your test assertions and failure messages more readable. Similar to AssertJ, it natively supports many JDK and Guava types, and it is extensible to others.
Truth is owned and maintained by the Guava team. It is used from the majority of the tests in Google’s own codebase.
Read more at the main website.