diff options
author | cpovirk <cpovirk@google.com> | 2019-05-30 13:06:51 -0700 |
---|---|---|
committer | Ron Shapiro <shapiro.rd@gmail.com> | 2019-06-06 11:06:15 -0400 |
commit | c72d08eef418f01a7dd1f2d1aedac047f05e7a4e (patch) | |
tree | bfc1a6c5e5fbd7fa1dacc8ca58e1c66793a0a2b1 | |
parent | 376109fe6e77d5c78dadcf0481347ce5813ccdcf (diff) | |
download | jimfs-c72d08eef418f01a7dd1f2d1aedac047f05e7a4e.tar.gz |
Fix internal build breakage from making assertThat(SortedSet) @GoogleInternal.
(https://github.com/google/truth/issues/556)
RELNOTES=n/a
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=250746093
-rw-r--r-- | jimfs/src/test/java/com/google/common/jimfs/DirectoryTest.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/jimfs/src/test/java/com/google/common/jimfs/DirectoryTest.java b/jimfs/src/test/java/com/google/common/jimfs/DirectoryTest.java index bb8c379..6cbe6d8 100644 --- a/jimfs/src/test/java/com/google/common/jimfs/DirectoryTest.java +++ b/jimfs/src/test/java/com/google/common/jimfs/DirectoryTest.java @@ -215,8 +215,15 @@ public class DirectoryTest { root.link(Name.simple("bar"), regularFile(10)); root.link(Name.simple("abc"), regularFile(10)); + /* + * If we inline this into the assertThat call below, javac resolves it to assertThat(SortedSet), + * which isn't available publicly. Our @GoogleInternal checks consider that to be an error, even + * though the code will compile fine externally by resolving to assertThat(Iterable) instead. So + * we avoid that by assigning to a non-SortedSet type here. + */ + ImmutableSet<Name> snapshot = root.snapshot(); // does not include . or .. and is sorted by the name - assertThat(root.snapshot()) + assertThat(snapshot) .containsExactly(Name.simple("abc"), Name.simple("bar"), Name.simple("foo")); } |