Skip to content

Commit cf4813a

Browse files
munificentCommit Queue
authored andcommitted
Reformat tests/language/u** using 3.8 style.
Change-Id: I0618aa2abf0cd541dad70a77430a2745340f485a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425405 Auto-Submit: Bob Nystrom <[email protected]> Commit-Queue: Lasse Nielsen <[email protected]> Reviewed-by: Lasse Nielsen <[email protected]>
1 parent 3379826 commit cf4813a

36 files changed

+539
-416
lines changed

tests/language/unsorted/additional_interface_adds_optional_args_concrete_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ abstract class I {
1111
}
1212

1313
class B extends A implements I {
14-
// ^
15-
// [analyzer] COMPILE_TIME_ERROR.INVALID_IMPLEMENTATION_OVERRIDE
16-
// [cfe] The implementation of 'foo' in the non-abstract class 'B' does not conform to its interface.
14+
// ^
15+
// [analyzer] COMPILE_TIME_ERROR.INVALID_IMPLEMENTATION_OVERRIDE
16+
// [cfe] The implementation of 'foo' in the non-abstract class 'B' does not conform to its interface.
1717

1818
// This class declaration violates soundness, since it allows `new
1919
// B().foo(42)`, which would lead to invalid arguments being passed to A.foo.

tests/language/unsorted/assignable_expression_runtime_test.dart

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,15 @@ dynamic variable = 0;
1717
main() {
1818
variable = 0;
1919

20-
21-
22-
2320
C.field = 0;
2421

25-
26-
27-
2822
variable = [1, 2, 3];
2923
variable[0] = 0;
3024
(variable)[0] = 0;
3125

32-
33-
34-
3526
C.field = [1, 2, 3];
3627

37-
38-
39-
4028
var a = 0;
4129

42-
43-
44-
4530
// Neat palindrome expression. x is assignable, ((x)) is not.
46-
4731
}

tests/language/unsorted/bad_override_runtime_test.dart

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ class Fisk {
1010

1111
set fisk(x) {}
1212

13-
1413
get hest => null;
1514
set hest(x) {}
1615

@@ -20,12 +19,7 @@ class Fisk {
2019
nullary() {}
2120
}
2221

23-
class Hest extends Fisk {
24-
25-
26-
27-
28-
}
22+
class Hest extends Fisk {}
2923

3024
main() {
3125
new Fisk();

tests/language/unsorted/bad_override_test.dart

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44

55
class Fisk {
66
get fisk => null;
7-
static
8-
set fisk(x) {}
9-
// ^^^^
7+
static set fisk(x) {}
8+
// ^^^^
109
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE
1110
// [cfe] Static property 'fisk' conflicts with instance property of the same name.
1211
// [cfe] This static member conflicts with an instance member.
1312

14-
static
15-
get hest => null;
16-
// ^^^^
13+
static get hest => null;
14+
// ^^^^
1715
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE
1816
// [cfe] This static member conflicts with an instance member.
1917
set hest(x) {}
@@ -32,17 +30,17 @@ class Hest extends Fisk {
3230
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE
3331
// [cfe] Can't declare a member that conflicts with an inherited one.
3432
field() {}
35-
//^^^^^
36-
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_METHOD_AND_FIELD
37-
// [cfe] Can't declare a member that conflicts with an inherited one.
33+
// [error column 3, length 5]
34+
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_METHOD_AND_FIELD
35+
// [cfe] Can't declare a member that conflicts with an inherited one.
3836
var method;
3937
// ^^^^^^
4038
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_FIELD_AND_METHOD
4139
// [cfe] Can't declare a member that conflicts with an inherited one.
4240
nullary(x) {}
43-
//^^^^^^^
44-
// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
45-
// [cfe] The method 'Hest.nullary' has more required arguments than those of overridden method 'Fisk.nullary'.
41+
// [error column 3, length 7]
42+
// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
43+
// [cfe] The method 'Hest.nullary' has more required arguments than those of overridden method 'Fisk.nullary'.
4644
}
4745

4846
main() {

tests/language/unsorted/callable_runtime_test.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ main() {
4141
Function g = y; // Should pass checked mode test
4242
F f0 = y; // Should pass checked mode test
4343

44-
45-
46-
4744
Expect.equals(f(), 42);
4845
Expect.equals(g(100), 187);
4946

tests/language/unsorted/check_member_static_runtime_1_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ class B extends A {}
1414

1515
class C extends B {
1616
var a;
17-
1817
}
1918

2019
void main() {

tests/language/unsorted/check_member_static_runtime_test.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ class A {
1212

1313
class B extends A {}
1414

15-
class C extends B {
16-
17-
18-
}
15+
class C extends B {}
1916

2017
void main() {
2118
new C();

tests/language/unsorted/check_method_override_runtime_test.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ class A {
1010
foo(var a, [x, y]) {}
1111
}
1212

13-
class C extends A {
14-
15-
16-
}
13+
class C extends A {}
1714

1815
main() {
1916
new A().foo(2);

tests/language/unsorted/check_method_override_test.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ class A {
99

1010
class C extends A {
1111
f() {}
12-
//^
13-
// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
14-
// [cfe] The method 'C.f' has fewer positional arguments than those of overridden method 'A.f'.
12+
// [error column 3, length 1]
13+
// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
14+
// [cfe] The method 'C.f' has fewer positional arguments than those of overridden method 'A.f'.
1515
foo(var a, [x]) {}
16-
//^^^
17-
// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
18-
// [cfe] The method 'C.foo' has fewer positional arguments than those of overridden method 'A.foo'.
16+
// [error column 3, length 3]
17+
// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
18+
// [cfe] The method 'C.foo' has fewer positional arguments than those of overridden method 'A.foo'.
1919
}
2020

2121
main() {

tests/language/unsorted/checked_method_error_order_test.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ main() {
2828
var m = e.toString();
2929
return m.contains("is not a subtype of type 'int'") ||
3030
m.contains(
31-
"Expected a value of type 'int', but got one of type 'String'");
31+
"Expected a value of type 'int', but got one of type 'String'",
32+
);
3233
}
3334
return false;
3435
});
@@ -37,7 +38,8 @@ main() {
3738
var m = e.toString();
3839
return m.contains("is not a subtype of type 'int?'") ||
3940
m.contains(
40-
"Expected a value of type 'int?', but got one of type 'String'");
41+
"Expected a value of type 'int?', but got one of type 'String'",
42+
);
4143
}
4244
return false;
4345
});

0 commit comments

Comments
 (0)