Skip to content

Commit d7ed156

Browse files
munificentCommit Queue
authored andcommitted
Opt multitests out of formatting in web/.
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. Change-Id: I3d6346d31581772dc8e1701594bf9d919f28db7d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396104 Commit-Queue: Bob Nystrom <[email protected]> Reviewed-by: Srujan Gaddam <[email protected]> Reviewed-by: Nate Biggs <[email protected]> Commit-Queue: Srujan Gaddam <[email protected]> Auto-Submit: Bob Nystrom <[email protected]>
1 parent 6129842 commit d7ed156

30 files changed

+91
-1
lines changed

tests/web/LayoutTests_fast_mediastream_getusermedia_t01_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 derived from a broken co19 test
69
/// (LayoutTests/fast/mediastream/getusermedia_t01.dart). Caused dart2js to
710
/// crash.

tests/web/bounds_check_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
main() {
69
var a = [0, 1];
710
a[-1]; // //# 01: runtime error

tests/web/checked_setter_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/expect.dart';
69

710
class A {

tests/web/compile_time_constant4_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/expect.dart";
69

710
const x = "foo";

tests/web/constant_truncate_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
const a0 = 0 ~/ 0; //# a0: compile-time error
69
const a1 = 0.0 ~/ 0; //# a1: compile-time error
710
const a2 = -0.0 ~/ 0; //# a2: compile-time error

tests/web/deferred/regress_35311/regress_35311_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 'lib.dart' deferred as lib;
69

710
main() async {

tests/web/dynamic_invocation_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/expect.dart";
69

710
class C1 {

tests/web/eof_line_ending_test.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
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.
4-
4+
5+
// Formatting can break multitests, so don't format them.
6+
// dart format off
7+
58
// Regression test derived from language/issue_1578_test.dart with Windows
69
// line encoding.
710

tests/web/function_typed_arguments_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
// dart2jsOptions=--omit-implicit-checks
69

710
// Test type tests of function types used a type argument.

tests/web/if_method_call_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
// Regression test for bug in dart2js type promotion.
69

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

0 commit comments

Comments
 (0)