aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google
diff options
context:
space:
mode:
authorGravatar vladmos <vladmos@google.com>2018-03-22 06:05:45 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-03-22 06:07:11 -0700
commitbc4a0a2393768457f95ac0a54bfc641fede6032a (patch)
tree1f98c2b89f5a86bc56c360cf72c73aedc498150e /src/test/java/com/google
parent4aa3e06e2226dce83ee6430e80dc7c7d0d67e93e (diff)
Remove the --incompatible_disallow_uncalled_set_constructor flag
RELNOTES[INC]: The --incompatible_disallow_uncalled_set_constructor flag is no longer available, the `set` constructor` is completely removed from Skylark. Use `depset` instead. PiperOrigin-RevId: 190053331
Diffstat (limited to 'src/test/java/com/google')
-rw-r--r--src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java2
-rw-r--r--src/test/java/com/google/devtools/build/lib/syntax/SkylarkNestedSetTest.java27
2 files changed, 0 insertions, 29 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java b/src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java
index 7cde32faca..a9a3d517f7 100644
--- a/src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java
+++ b/src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java
@@ -127,7 +127,6 @@ public class SkylarkSemanticsConsistencyTest {
"--incompatible_disallow_dict_plus=" + rand.nextBoolean(),
"--incompatible_disallow_three_arg_vardef=" + rand.nextBoolean(),
"--incompatible_disallow_toplevel_if_statement=" + rand.nextBoolean(),
- "--incompatible_disallow_uncalled_set_constructor=" + rand.nextBoolean(),
"--incompatible_new_actions_api=" + rand.nextBoolean(),
"--incompatible_remove_native_git_repository=" + rand.nextBoolean(),
"--incompatible_remove_native_http_archive=" + rand.nextBoolean(),
@@ -150,7 +149,6 @@ public class SkylarkSemanticsConsistencyTest {
.incompatibleDisallowDictPlus(rand.nextBoolean())
.incompatibleDisallowThreeArgVardef(rand.nextBoolean())
.incompatibleDisallowToplevelIfStatement(rand.nextBoolean())
- .incompatibleDisallowUncalledSetConstructor(rand.nextBoolean())
.incompatibleNewActionsApi(rand.nextBoolean())
.incompatibleRemoveNativeGitRepository(rand.nextBoolean())
.incompatibleRemoveNativeHttpArchive(rand.nextBoolean())
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/SkylarkNestedSetTest.java b/src/test/java/com/google/devtools/build/lib/syntax/SkylarkNestedSetTest.java
index 307f416fe0..0836d0ed38 100644
--- a/src/test/java/com/google/devtools/build/lib/syntax/SkylarkNestedSetTest.java
+++ b/src/test/java/com/google/devtools/build/lib/syntax/SkylarkNestedSetTest.java
@@ -36,33 +36,6 @@ import org.junit.runners.JUnit4;
public class SkylarkNestedSetTest extends EvaluationTestCase {
@Test
- public void testLegacyConstructorNotCalled() throws Exception {
- env =
- newEnvironmentWithSkylarkOptions("--incompatible_disallow_uncalled_set_constructor=false");
- eval("s = set([1, 2]) if False else depset([3, 4])");
- SkylarkNestedSet s = get("s");
- assertThat(s.getSet(Object.class)).containsExactly(3, 4);
-
- // Static check are only enabled in .bzl files
- new SkylarkTest("--incompatible_disallow_uncalled_set_constructor=true")
- .testIfErrorContains("The function 'set' has been removed in favor of 'depset'",
- "s = set([1, 2]) if False else depset([3, 4])");
- new BuildTest("--incompatible_disallow_uncalled_set_constructor=true")
- .testEval("s = set([1, 2]) if False else depset([3, 4]); s.to_list()", "[3, 4]");
- }
-
- @Test
- public void testLegacyConstructorCalled() throws Exception {
- new BothModesTest("--incompatible_disallow_uncalled_set_constructor=false")
- .testIfErrorContains("The function 'set' has been removed in favor of 'depset'",
- "s = set([1, 2])");
-
- new BothModesTest("--incompatible_disallow_uncalled_set_constructor=true")
- .testIfErrorContains("The function 'set' has been removed in favor of 'depset'",
- "s = set([1, 2])");
- }
-
- @Test
public void testConstructor() throws Exception {
eval("s = depset(order='default')");
assertThat(lookup("s")).isInstanceOf(SkylarkNestedSet.class);