Automated refactor of Label.parseAbsolute() to always pass a repository mapping
RELNOTES: None
PiperOrigin-RevId: 202360925
diff --git a/src/test/java/com/google/devtools/build/lib/packages/AttributeTest.java b/src/test/java/com/google/devtools/build/lib/packages/AttributeTest.java
index 2244ca5..077ee3f 100644
--- a/src/test/java/com/google/devtools/build/lib/packages/AttributeTest.java
+++ b/src/test/java/com/google/devtools/build/lib/packages/AttributeTest.java
@@ -24,6 +24,7 @@
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
import com.google.devtools.build.lib.analysis.config.BuildOptions;
import com.google.devtools.build.lib.analysis.config.HostTransition;
import com.google.devtools.build.lib.analysis.config.transitions.SplitTransition;
@@ -149,7 +150,7 @@
assertDefaultValue("foo",
attr("x", STRING).value("foo").build());
- Label label = Label.parseAbsolute("//foo:bar");
+ Label label = Label.parseAbsolute("//foo:bar", ImmutableMap.of());
assertDefaultValue(null,
attr("x", LABEL).legacyAllowAnyFileType().build());
assertDefaultValue(label,
@@ -161,8 +162,10 @@
assertDefaultValue(slist,
attr("x", STRING_LIST).value(slist).build());
- List<Label> llist = Arrays.asList(Label.parseAbsolute("//foo:bar"),
- Label.parseAbsolute("//foo:wiz"));
+ List<Label> llist =
+ Arrays.asList(
+ Label.parseAbsolute("//foo:bar", ImmutableMap.of()),
+ Label.parseAbsolute("//foo:wiz", ImmutableMap.of()));
assertDefaultValue(Collections.emptyList(),
attr("x", LABEL_LIST).legacyAllowAnyFileType().build());
assertDefaultValue(llist,
@@ -184,7 +187,7 @@
assertType(STRING,
attr("x", STRING).value("foo").build());
- Label label = Label.parseAbsolute("//foo:bar");
+ Label label = Label.parseAbsolute("//foo:bar", ImmutableMap.of());
assertType(LABEL,
attr("x", LABEL).legacyAllowAnyFileType().build());
assertType(LABEL,
@@ -196,8 +199,10 @@
assertType(STRING_LIST,
attr("x", STRING_LIST).value(slist).build());
- List<Label> llist = Arrays.asList(Label.parseAbsolute("//foo:bar"),
- Label.parseAbsolute("//foo:wiz"));
+ List<Label> llist =
+ Arrays.asList(
+ Label.parseAbsolute("//foo:bar", ImmutableMap.of()),
+ Label.parseAbsolute("//foo:wiz", ImmutableMap.of()));
assertType(LABEL_LIST,
attr("x", LABEL_LIST).legacyAllowAnyFileType().build());
assertType(LABEL_LIST,