diff --git a/dataset/GitHub_Java/bazelbuild.bazel/src/test/java/com/google/devtools/build/lib/skylark/SkylarkDefinedAspectsTest.java b/dataset/GitHub_Java/bazelbuild.bazel/src/test/java/com/google/devtools/build/lib/skylark/SkylarkDefinedAspectsTest.java index 28087656812..a79bd295e4b 100644 --- a/dataset/GitHub_Java/bazelbuild.bazel/src/test/java/com/google/devtools/build/lib/skylark/SkylarkDefinedAspectsTest.java +++ b/dataset/GitHub_Java/bazelbuild.bazel/src/test/java/com/google/devtools/build/lib/skylark/SkylarkDefinedAspectsTest.java @@ -356,7 +356,7 @@ public void aspectsPropagatingForDefaultAndImplicit() throws Exception { return ((Label) o).getName(); })); - assertThat(names).containsAtLeast("xxx", "yyy"); + assertThat(names).containsAllOf("xxx", "yyy"); // Third is the C++ toolchain; its name changes between Blaze and Bazel. assertThat(names).hasSize(3); } diff --git a/dataset/GitHub_Java/bazelbuild.bazel/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java b/dataset/GitHub_Java/bazelbuild.bazel/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java index 834de44eef6..175c38b7dea 100644 --- a/dataset/GitHub_Java/bazelbuild.bazel/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java +++ b/dataset/GitHub_Java/bazelbuild.bazel/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java @@ -2916,28 +2916,6 @@ public void testNoRuleOutputsParam() throws Exception { + "re-enabled by setting --incompatible_no_rule_outputs_param=false"); } - @Test - public void testExecutableNotInRunfiles() throws Exception { - setSkylarkSemanticsOptions("--incompatible_disallow_struct_provider_syntax=false"); - scratch.file( - "test/skylark/test_rule.bzl", - "def _my_rule_impl(ctx):", - " exe = ctx.actions.declare_file('exe')", - " ctx.actions.run_shell(outputs=[exe], command='touch exe')", - " runfile = ctx.actions.declare_file('rrr')", - " ctx.actions.run_shell(outputs=[runfile], command='touch rrr')", - " return struct(executable = exe, default_runfiles = ctx.runfiles(files = [runfile]))", - "my_rule = rule(implementation = _my_rule_impl, executable = True)"); - scratch.file( - "test/skylark/BUILD", - "load('//test/skylark:test_rule.bzl', 'my_rule')", - "my_rule(name = 'target')"); - - reporter.removeHandler(failFastHandler); - getConfiguredTarget("//test/skylark:target"); - assertContainsEvent("exe not included in runfiles"); - } - /** * Skylark integration test that forces inlining. */ diff --git a/dataset/GitHub_Java/bazelbuild.bazel/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java b/dataset/GitHub_Java/bazelbuild.bazel/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java index 1d951c58316..b780ef26e96 100644 --- a/dataset/GitHub_Java/bazelbuild.bazel/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java +++ b/dataset/GitHub_Java/bazelbuild.bazel/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java @@ -781,7 +781,7 @@ public void testResolveTools() throws Exception { Iterables.getOnlyElement( ruleContext.getRuleContext().getAnalysisEnvironment().getRegisteredActions()); assertThat(ActionsTestUtil.baseArtifactNames(action.getInputs())) - .containsAtLeast( + .containsAllOf( "mytool.sh", "mytool", "foo_Smytool" + OsUtils.executableExtension() + "-runfiles", @@ -2883,7 +2883,7 @@ public void testFilesToRunInActionsRun() throws Exception { getGeneratingAction( Iterables.getOnlyElement(r.getProvider(FileProvider.class).getFilesToBuild())); assertThat(ActionsTestUtil.baseArtifactNames(action.getRunfilesSupplier().getArtifacts())) - .containsAtLeast("tool", "tool.sh", "data"); + .containsAllOf("tool", "tool.sh", "data"); } @Test @@ -2911,7 +2911,7 @@ public void testFilesToRunInActionsTools() throws Exception { getGeneratingAction( Iterables.getOnlyElement(r.getProvider(FileProvider.class).getFilesToBuild())); assertThat(ActionsTestUtil.baseArtifactNames(action.getRunfilesSupplier().getArtifacts())) - .containsAtLeast("tool", "tool.sh", "data"); + .containsAllOf("tool", "tool.sh", "data"); } // Verifies that configuration_field can only be used on 'label' attributes. @@ -3208,4 +3208,3 @@ public String getMessage() { } } } - diff --git a/dataset/GitHub_Java/bazelbuild.bazel/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java b/dataset/GitHub_Java/bazelbuild.bazel/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java index 2e8fdc71267..12a789aa20a 100644 --- a/dataset/GitHub_Java/bazelbuild.bazel/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java +++ b/dataset/GitHub_Java/bazelbuild.bazel/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java @@ -1487,8 +1487,8 @@ public void testClassObjectAccess() throws Exception { } @Test - public void testInSetDeprecated() throws Exception { - new SkylarkTest("--incompatible_depset_is_not_iterable=false") + public void testInSet() throws Exception { + new SkylarkTest() .testStatement("'b' in depset(['a', 'b'])", Boolean.TRUE) .testStatement("'c' in depset(['a', 'b'])", Boolean.FALSE) .testStatement("1 in depset(['a', 'b'])", Boolean.FALSE); diff --git a/dataset/GitHub_Java/bazelbuild.bazel/src/test/java/com/google/devtools/build/lib/syntax/SkylarkNestedSetTest.java b/dataset/GitHub_Java/bazelbuild.bazel/src/test/java/com/google/devtools/build/lib/syntax/SkylarkNestedSetTest.java index e085738bfb3..3a106dac55f 100644 --- a/dataset/GitHub_Java/bazelbuild.bazel/src/test/java/com/google/devtools/build/lib/syntax/SkylarkNestedSetTest.java +++ b/dataset/GitHub_Java/bazelbuild.bazel/src/test/java/com/google/devtools/build/lib/syntax/SkylarkNestedSetTest.java @@ -268,7 +268,9 @@ public void testItemsAndTransitive() throws Exception { public void testTooManyPositionals() throws Exception { new BothModesTest() .testIfErrorContains( - "expected no more than 2 positional arguments, but got 3", "depset([], 'default', [])"); + "expected no more than 2 positional arguments, but got 3, for call to function " + + "depset(items = [], order = \"default\", direct = None, transitive = None)", + "depset([], 'default', [])"); }