Skip to content

Commit a11de6c

Browse files
hvadehracopybara-github
authored andcommitted
Migrate the JavaImportConfiguredTargetTest.testAllowsJarInSrcjars test to Starlark
The test is removed from Bazel and added to rules_java (ignore-relnotes) PiperOrigin-RevId: 756244222 Change-Id: If7dac73f295c0c98e1b600d8c57aa7c1d1cb8554
1 parent 9e22929 commit a11de6c

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

src/test/java/com/google/devtools/build/lib/view/java/JavaImportConfiguredTargetTest.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import static com.google.devtools.build.lib.rules.java.JavaCompileActionTestHelper.getDirectJars;
2121
import static com.google.devtools.build.lib.skyframe.BzlLoadValue.keyForBuild;
2222

23-
import com.google.common.collect.Iterables;
2423
import com.google.common.collect.Sets;
2524
import com.google.devtools.build.lib.actions.Artifact;
2625
import com.google.devtools.build.lib.actions.util.ActionsTestUtil;
@@ -38,7 +37,6 @@
3837
import com.google.devtools.build.lib.rules.java.JavaCompilationArgsProvider;
3938
import com.google.devtools.build.lib.rules.java.JavaCompileAction;
4039
import com.google.devtools.build.lib.rules.java.JavaInfo;
41-
import com.google.devtools.build.lib.rules.java.JavaRuleOutputJarsProvider;
4240
import com.google.devtools.build.lib.rules.java.JavaSourceJarsProvider;
4341
import java.util.List;
4442
import java.util.Set;
@@ -76,27 +74,6 @@ public final void writeBuildFile() throws Exception {
7674
""");
7775
}
7876

79-
@Test
80-
public void testAllowsJarInSrcjars() throws Exception {
81-
scratch.file(
82-
"java/srcjarlib/BUILD",
83-
"""
84-
load("@rules_java//java:defs.bzl", "java_import")
85-
java_import(
86-
name = "library-jar",
87-
jars = ["somelib.jar"],
88-
srcjar = "somelib-src.jar",
89-
)
90-
""");
91-
ConfiguredTarget jarLib = getConfiguredTarget("//java/srcjarlib:library-jar");
92-
assertThat(
93-
Iterables.getOnlyElement(
94-
JavaInfo.getProvider(JavaRuleOutputJarsProvider.class, jarLib)
95-
.getAllSrcOutputJars())
96-
.prettyPrint())
97-
.isEqualTo("java/srcjarlib/somelib-src.jar");
98-
}
99-
10077
@Test
10178
public void testRequiresJars() throws Exception {
10279
checkError(

0 commit comments

Comments
 (0)