Throw ComparisonFailure from containsEntry.

This (very, very belatedly) fixes the specific case reported in bug 18703893. But there are likely to be other cases in which ComparisonFailure would be helpful. I've addressed a couple already (OptionalSubject.hasValue, IterableSubject.containsExactly (in some cases)), but I'm sure there are others. Now that We Have the Technology to do this, please do file any pent-up requests from the last 3+ years. Sorry that this took so long.

RELNOTES=Started throwing `ComparisonFailure` from `MapSubject.containsEntry`.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191914582
2 files changed
tree: 19e5f019548f42e4c995da1ac43c2569f27606fe
  1. core/
  2. extensions/
  3. util/
  4. .gitignore
  5. .travis.yml
  6. CONTRIBUTING.md
  7. LICENSE
  8. pom.xml
  9. README.md
README.md

Main Site Build Status Maven Release Stackoverflow

What is Truth?

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.