commit | c96f04bc586e159b54cc4d86d2e211d106cbf912 | [log] [tgz] |
---|---|---|
author | cpovirk <cpovirk@google.com> | Thu Apr 18 05:50:45 2019 -0700 |
committer | Ron Shapiro <shapiro.rd@gmail.com> | Thu Apr 18 17:00:28 2019 -0400 |
tree | 3a2577c41ec46c850a9e9489bf78979e7b2c0905 | |
parent | af4f2924c75c53c66a24d91f5801fad7b4b79036 [diff] |
Migrate Truth Subjects from no-arg check() to the overload that accepts a description. The overload that accepts a description generally produces better failure messages: - The first line of the message it produces is something like: "value of: myProto.getResponse()" (where "getResponse()" is taken from the provided description) - The last line of the message it produces is something like: "myProto was: response: query was throttled" (the full value of myProto) - And the existing text goes in between. Additional motivation: We have deprecated the no-arg overload in open-source Truth. Note that the new overload is available externally as of Truth 0.40. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=244171385
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.