Skip to content

Commit

Permalink
Remove UI as code experimental flags from our tests
Browse files Browse the repository at this point in the history
The features control-flow-collections and spread-collections have been
shipped and it is no longer necessary for tests to explicitly opt into
them.

Change-Id: I074b91d12e4e485ee4a64147947bb1113899ecdc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104780
Auto-Submit: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
  • Loading branch information
Kevin Millikin authored and commit-bot@chromium.org committed Jun 6, 2019
1 parent 3894b08 commit 64b0ce5
Show file tree
Hide file tree
Showing 41 changed files with 7 additions and 74 deletions.
1 change: 0 additions & 1 deletion tests/compiler/dart2js_extra/boolean_conversion_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections
// dart2jsOptions=--omit-implicit-checks

// Note: --omit-implicit-checks causes Expect.isNull to misbehave, so we use
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections,spread-collections

// Test how await for interacts with inference.
import "package:async_helper/async_helper.dart";
import 'package:expect/expect.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections,spread-collections

// Test that a null stream expression procudes a runtime error.
import 'package:async_helper/async_helper.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections

void main() {
// Use await for in non-async function.
var _ = [await for (var i in Stream<int>.empty()) i]; //# 01: compile-time error
Expand Down
2 changes: 0 additions & 2 deletions tests/language_2/control_flow_collections/await_for_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections,spread-collections

import 'package:async_helper/async_helper.dart';
import 'package:expect/expect.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections

void main() {
() async {
// Non-Stream type.
Expand Down
2 changes: 0 additions & 2 deletions tests/language_2/control_flow_collections/for_await_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections

import "package:async_helper/async_helper.dart";
import 'package:expect/expect.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections

void main() {
// For cannot be used in a const collection.
const _ = [for (var i in []) 1]; //# 00: compile-time error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections,spread-collections

// Test how control flow interacts with inference.
import 'package:expect/expect.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections,spread-collections

import 'package:expect/expect.dart';

void main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections,spread-collections

import 'package:expect/expect.dart';

void main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections,spread-collections

import 'package:expect/expect.dart';

void main() {
Expand Down
2 changes: 0 additions & 2 deletions tests/language_2/control_flow_collections/for_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections,spread-collections

import 'package:expect/expect.dart';

import 'utils.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections,spread-collections

/// Tests for how variables and scoping work with for elements.
import 'package:expect/expect.dart';

Expand Down
2 changes: 0 additions & 2 deletions tests/language_2/control_flow_collections/if_await_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections

import "package:async_helper/async_helper.dart";
import 'package:expect/expect.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections,constant-update-2018
// SharedOptions=--enable-experiment=constant-update-2018

import 'dart:collection';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Check that 'if' in const collections is not enabled without the experimental
// constant-update-2018 flag.

// SharedOptions=--enable-experiment=control-flow-collections,no-constant-update-2018
// SharedOptions=--enable-experiment=no-constant-update-2018

void main() {
// If cannot be used in a const collection.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections,spread-collections,constant-update-2018
// SharedOptions=--enable-experiment=constant-update-2018

import 'package:expect/expect.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections,spread-collections

// Test how control flow interacts with inference.
import 'package:expect/expect.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections

import 'package:expect/expect.dart';

void main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections

class A {
var a = "a";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections,spread-collections

import 'package:expect/expect.dart';

void main() {
Expand Down
2 changes: 0 additions & 2 deletions tests/language_2/control_flow_collections/if_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections,spread-collections

import 'package:expect/expect.dart';

import 'utils.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections,spread-collections

// Test cases where the syntax is ambiguous between maps and sets when control
// flow elements contain spreads.
import 'dart:collection';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections,spread-collections

// Test cases where the syntax is ambiguous between maps and sets because of
// spreads inside control flow.
import 'dart:collection';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections,spread-collections

void main() {
// No then element.
var _ = [if (true)]; //# 00: syntax error
Expand Down
2 changes: 0 additions & 2 deletions tests/language_2/control_flow_collections/syntax_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections

// Tests syntax edge cases.
import 'package:expect/expect.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=control-flow-collections

void main() {
// Non-Boolean if condition.
var _ = <int>[if (1) 2]; //# 00: compile-time error
Expand Down
2 changes: 0 additions & 2 deletions tests/language_2/spread_collections/await_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=spread-collections

import "package:async_helper/async_helper.dart";
import 'package:expect/expect.dart';

Expand Down
2 changes: 1 addition & 1 deletion tests/language_2/spread_collections/const_error_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
// SharedOptions=--enable-experiment=constant-update-2018

import 'dart:collection';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Check that 'spread' in const collections is not enabled without the
// experimental constant-update-2018 flag.

// SharedOptions=--enable-experiment=spread-collections,no-constant-update-2018
// SharedOptions=--enable-experiment=no-constant-update-2018

const constList = [1, 2, 3, 4];
const constSet = {1, 2, 3, 4};
Expand Down
2 changes: 1 addition & 1 deletion tests/language_2/spread_collections/const_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=spread-collections,constant-update-2018
// SharedOptions=--enable-experiment=constant-update-2018

import 'package:expect/expect.dart';

Expand Down
2 changes: 0 additions & 2 deletions tests/language_2/spread_collections/inference_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=spread-collections

// Test how spread interacts with inference.
import 'package:expect/expect.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=spread-collections

// Test cases where the syntax is ambiguous between maps and sets.
import 'dart:collection';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=spread-collections

// Test cases where the syntax is ambiguous between maps and sets.
import 'dart:collection';

Expand Down
2 changes: 0 additions & 2 deletions tests/language_2/spread_collections/runtime_error_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=spread-collections

import 'package:expect/expect.dart';

// Typed as dynamic to also test spreading a value of type dynamic.
Expand Down
2 changes: 0 additions & 2 deletions tests/language_2/spread_collections/spread_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=spread-collections

import 'package:expect/expect.dart';

import 'helper_classes.dart';
Expand Down
2 changes: 0 additions & 2 deletions tests/language_2/spread_collections/syntax_error_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=spread-collections

void main() {
// Spread nothing.
var _ = [...]; //# 00: syntax error
Expand Down
2 changes: 0 additions & 2 deletions tests/language_2/spread_collections/syntax_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=spread-collections

// Tests syntax edge cases.
import 'package:expect/expect.dart';

Expand Down
2 changes: 0 additions & 2 deletions tests/language_2/spread_collections/type_error_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=spread-collections

void main() {
// Spread non-iterable or non-map.
var _ = [...(3)]; //# 00: compile-time error
Expand Down
2 changes: 1 addition & 1 deletion tests/language_2/vm/osr_nonempty_stack_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// SharedOptions=--enable-experiment=spread-collections,control-flow-collections,constant-update-2018
// SharedOptions=--enable-experiment=constant-update-2018

// Test with OSR on non-empty stack (block expression).

Expand Down

0 comments on commit 64b0ce5

Please sign in to comment.