diff options
author | dannark <dannark@google.com> | 2018-06-27 13:35:04 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-27 13:36:25 -0700 |
commit | 90e2b4b5e745fe2de9ca82bc8163c198e5be8ca9 (patch) | |
tree | f827defac036acf55c4253c01f11126e0c502572 /src/test/java/com/google/devtools/build/lib/pkgcache/IOExceptionsTest.java | |
parent | 116971c08caa3f9bd94fc91066cd4cd1e432cafe (diff) |
Automated refactor of Label.parseAbsolute() to always pass a repository mapping
RELNOTES: None
PiperOrigin-RevId: 202360925
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/pkgcache/IOExceptionsTest.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/pkgcache/IOExceptionsTest.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/pkgcache/IOExceptionsTest.java b/src/test/java/com/google/devtools/build/lib/pkgcache/IOExceptionsTest.java index 40324ad625..de8e71b221 100644 --- a/src/test/java/com/google/devtools/build/lib/pkgcache/IOExceptionsTest.java +++ b/src/test/java/com/google/devtools/build/lib/pkgcache/IOExceptionsTest.java @@ -16,6 +16,7 @@ package com.google.devtools.build.lib.pkgcache; import static com.google.common.truth.Truth.assertThat; import com.google.common.base.Function; +import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.devtools.build.lib.clock.BlazeClock; import com.google.devtools.build.lib.cmdline.Label; @@ -107,7 +108,7 @@ public class IOExceptionsTest extends PackageLoadingTestCase { return null; } }; - assertThat(visitTransitively(Label.parseAbsolute("//pkg:x"))).isFalse(); + assertThat(visitTransitively(Label.parseAbsolute("//pkg:x", ImmutableMap.of()))).isFalse(); scratch.overwriteFile("pkg/BUILD", "# another comment to force reload", "sh_library(name = 'x')"); @@ -115,7 +116,7 @@ public class IOExceptionsTest extends PackageLoadingTestCase { syncPackages(); eventCollector.clear(); reporter.addHandler(failFastHandler); - assertThat(visitTransitively(Label.parseAbsolute("//pkg:x"))).isTrue(); + assertThat(visitTransitively(Label.parseAbsolute("//pkg:x", ImmutableMap.of()))).isTrue(); assertNoEvents(); } @@ -136,7 +137,7 @@ public class IOExceptionsTest extends PackageLoadingTestCase { return null; } }; - assertThat(visitTransitively(Label.parseAbsolute("//top:top"))).isFalse(); + assertThat(visitTransitively(Label.parseAbsolute("//top:top", ImmutableMap.of()))).isFalse(); assertContainsEvent("no such package 'pkg'"); // The traditional label visitor does not propagate the original IOException message. // assertContainsEvent("custom crash"); @@ -150,7 +151,7 @@ public class IOExceptionsTest extends PackageLoadingTestCase { syncPackages(); eventCollector.clear(); reporter.addHandler(failFastHandler); - assertThat(visitTransitively(Label.parseAbsolute("//top:top"))).isTrue(); + assertThat(visitTransitively(Label.parseAbsolute("//top:top", ImmutableMap.of()))).isTrue(); assertNoEvents(); } @@ -169,6 +170,6 @@ public class IOExceptionsTest extends PackageLoadingTestCase { return null; } }; - assertThat(visitTransitively(Label.parseAbsolute("//top/pkg:x"))).isFalse(); + assertThat(visitTransitively(Label.parseAbsolute("//top/pkg:x", ImmutableMap.of()))).isFalse(); } } |