Add an enum representing the specific build file name (WORKSPACE, BUILD) to the PackageLookupValue to reduce the number of references to the filename "BUILD".
--
MOS_MIGRATED_REVID=129203257
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java
index 119205a..e243a82 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java
@@ -51,18 +51,15 @@
import com.google.devtools.build.skyframe.RecordingDifferencer;
import com.google.devtools.build.skyframe.SkyKey;
import com.google.devtools.build.skyframe.SkyValue;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-
import java.io.IOException;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
-
import javax.annotation.Nullable;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Unit tests of specific functionality of PackageFunction. Note that it's already tested
@@ -102,6 +99,12 @@
}
@Test
+ public void testValidPackage() throws Exception {
+ scratch.file("pkg/BUILD");
+ validPackage(PackageValue.key(PackageIdentifier.parse("@//pkg")));
+ }
+
+ @Test
public void testInconsistentNewPackage() throws Exception {
scratch.file("pkg/BUILD", "subinclude('//foo:sub')");
scratch.file("foo/sub");