aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcpovirk <cpovirk@google.com>2019-05-06 07:49:13 -0700
committerRon Shapiro <shapiro.rd@gmail.com>2019-05-07 11:02:51 -0400
commitbd5f3cd72253a6d75c9e4e11482694ff47011e91 (patch)
tree9fad0cf125b1e30f579d21927ee221b0d65f847e
parent380c021f07b9f338ba440c0e8b60f165e7a77e76 (diff)
downloadjimfs-bd5f3cd72253a6d75c9e4e11482694ff47011e91.tar.gz
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 are deleting the no-arg overload externally (and probably internally thereafter). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=246824728
-rw-r--r--jimfs/src/test/java/com/google/common/jimfs/PathSubject.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/jimfs/src/test/java/com/google/common/jimfs/PathSubject.java b/jimfs/src/test/java/com/google/common/jimfs/PathSubject.java
index bb29b88..ea733eb 100644
--- a/jimfs/src/test/java/com/google/common/jimfs/PathSubject.java
+++ b/jimfs/src/test/java/com/google/common/jimfs/PathSubject.java
@@ -73,7 +73,7 @@ public final class PathSubject extends Subject<PathSubject, Path> {
*/
// TODO(cgruber): Talk to cdecker about removing this as an anti-pattern.
public PathSubject andThat(String path, LinkOption... linkOptions) {
- PathSubject newSubject = check().about(paths()).that(toPath(path));
+ PathSubject newSubject = check("path(%s", path).about(paths()).that(toPath(path));
if (linkOptions.length != 0) {
newSubject = newSubject.noFollowLinks();
}