Skip to content

Commit 5bb9e92

Browse files
munificentCommit Queue
authored andcommitted
Opt multitests out of formatting in language/.
The new formatter supports opting a region of code out from being formatted. I'm applying this marker to all of the multitests since those tests are often very sensitive to formatting and easily broken. This way, anyone touching a multitest (including me when I reformat the tests) doesn't have to remember to not run the formatter on it. Unfortunately, this doesn't opt out 100# of the multitests. There are a handful of multitests that also contain "@Dart=" comments and are thus formatted using the old style where the "// dart format off" marker has no effect. For those, we'll have to still be careful to not accidentally format them. Change-Id: I257d0ee1eb44eee57047be06b8520f0ccc7b56d3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396162 Auto-Submit: Bob Nystrom <[email protected]> Commit-Queue: Erik Ernst <[email protected]> Reviewed-by: Erik Ernst <[email protected]>
1 parent d6ddaf4 commit 5bb9e92

File tree

272 files changed

+789
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

272 files changed

+789
-5
lines changed

tests/language/async/await_syntax_test.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// Formatting can break multitests, so don't format them.
6+
// dart format off
7+
58
// Test async/await syntax.
69

710
import 'dart:async' show Stream;

tests/language/async/await_test.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// Formatting can break multitests, so don't format them.
6+
// dart format off
7+
58
// VMOptions=
69
// VMOptions=--optimization-counter-threshold=20
710

tests/language/async/continue_label_test.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// Formatting can break multitests, so don't format them.
6+
// dart format off
7+
58
import "package:expect/async_helper.dart";
69
import "package:expect/expect.dart";
710

tests/language/async/switch_test.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// Formatting can break multitests, so don't format them.
6+
// dart format off
7+
58
import "dart:async";
69
import "package:expect/async_helper.dart";
710
import "package:expect/expect.dart";

tests/language/async/throw_in_catch_test.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// Formatting can break multitests, so don't format them.
6+
// dart format off
7+
58
import "dart:async";
69
import "package:expect/async_helper.dart";
710
import "package:expect/expect.dart";

tests/language/async_star/async_star_invalid_test.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// Formatting can break multitests, so don't format them.
6+
// dart format off
7+
58
// Test that various invalid uses of `yield` are disallowed.
69

710
import "dart:async";

tests/language/call/method_function_typed_value_test.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// BSD-style license that can be found in the LICENSE file.
44
// Dart test program to test arithmetic operations.
55

6+
// Formatting can break multitests, so don't format them.
7+
// dart format off
8+
69
import "package:expect/expect.dart";
710

811
int f(int i) => 2 * i;

tests/language/call/method_implicit_tear_off_test.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// BSD-style license that can be found in the LICENSE file.
44
// Dart test program to test arithmetic operations.
55

6+
// Formatting can break multitests, so don't format them.
7+
// dart format off
8+
69
import "dart:async";
710
import "package:expect/expect.dart";
811

tests/language/call/method_must_not_be_field_test.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// BSD-style license that can be found in the LICENSE file.
44
// Dart test program to test arithmetic operations.
55

6+
// Formatting can break multitests, so don't format them.
7+
// dart format off
8+
69
import "package:expect/expect.dart";
710

811
class C {

tests/language/call/method_must_not_be_getter_test.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// BSD-style license that can be found in the LICENSE file.
44
// Dart test program to test arithmetic operations.
55

6+
// Formatting can break multitests, so don't format them.
7+
// dart format off
8+
69
import "package:expect/expect.dart";
710

811
class C {

0 commit comments

Comments
 (0)