Skip to content

Commit d50d8b6

Browse files
munificentCommit Queue
authored andcommitted
Format tests/language/f*.
Change-Id: Ib19a4e3cf90edd4c1496d6b467d172cd73e2f521 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407100 Reviewed-by: Lasse Nielsen <[email protected]> Auto-Submit: Bob Nystrom <[email protected]> Commit-Queue: Bob Nystrom <[email protected]>
1 parent 049db8b commit d50d8b6

File tree

136 files changed

+8023
-4504
lines changed

Some content is hidden

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

136 files changed

+8023
-4504
lines changed

tests/language/factory/factory2_test.dart

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,19 @@ abstract class A<T> {
1818
class AFactory {
1919
// Compile time error: should be AFactory<T> to match abstract class above
2020
factory A.create() {
21-
// ^
22-
// [analyzer] COMPILE_TIME_ERROR.INVALID_FACTORY_NAME_NOT_A_CLASS
23-
// [cfe] The name of a constructor must match the name of the enclosing class.
21+
// ^
22+
// [analyzer] COMPILE_TIME_ERROR.INVALID_FACTORY_NAME_NOT_A_CLASS
23+
// [cfe] The name of a constructor must match the name of the enclosing class.
2424
throw UnimplementedError();
2525
}
2626
}
2727

2828
abstract class Link<T> extends IterableBase<T> {
2929
// does not match constructor for LinkFactory
30-
factory Link(T head, [Link<T>? tail]) =
31-
LinkFactory<T>;
32-
// ^^^^^^^^^^^^^^
33-
// [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE
34-
// [cfe] The constructor function type 'LinkFactory<T> Function(dynamic, [Link<dynamic>?])' isn't a subtype of 'Link<T> Function(T, [Link<T>?])'.
30+
factory Link(T head, [Link<T>? tail]) = LinkFactory<T>;
31+
// ^^^^^^^^^^^^^^
32+
// [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE
33+
// [cfe] The constructor function type 'LinkFactory<T> Function(dynamic, [Link<dynamic>?])' isn't a subtype of 'Link<T> Function(T, [Link<T>?])'.
3534
Link<T> prepend(T element);
3635
}
3736

@@ -47,9 +46,9 @@ class LinkFactory<T> {
4746

4847
// Does not implement all of Iterable
4948
class AbstractLink<T> implements Link<T> {
50-
// ^^^^^^^^^^^^
51-
// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
52-
// [cfe] The non-abstract class 'AbstractLink' is missing implementations for these members:
49+
// ^^^^^^^^^^^^
50+
// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
51+
// [cfe] The non-abstract class 'AbstractLink' is missing implementations for these members:
5352
const AbstractLink();
5453
Link<T> prepend(T element) {
5554
return new Link<T>(element, this);
@@ -58,15 +57,15 @@ class AbstractLink<T> implements Link<T> {
5857

5958
// Does not implement all of Iterable
6059
class LinkTail<T> extends AbstractLink<T> implements EmptyLink<T> {
61-
// ^^^^^^^^
62-
// [cfe] The non-abstract class 'LinkTail' is missing implementations for these members:
60+
// ^
61+
// [cfe] The non-abstract class 'LinkTail' is missing implementations for these members:
6362
const LinkTail();
6463
}
6564

6665
// Does not implement all of Iterable
6766
class LinkEntry<T> extends AbstractLink<T> {
68-
// ^^^^^^^^^
69-
// [cfe] The non-abstract class 'LinkEntry' is missing implementations for these members:
67+
// ^
68+
// [cfe] The non-abstract class 'LinkEntry' is missing implementations for these members:
7069
LinkEntry(T head, Link<T>? realTail);
7170
}
7271

tests/language/factory/factory3_test.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ abstract class EmptyLink<T> extends Link<T> {
3333
}
3434

3535
class AbstractLink<T> implements Link<T> {
36-
// ^^^^^^^^^^^^
37-
// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
38-
// [cfe] The non-abstract class 'AbstractLink' is missing implementations for these members:
36+
// ^^^^^^^^^^^^
37+
// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
38+
// [cfe] The non-abstract class 'AbstractLink' is missing implementations for these members:
3939
const AbstractLink();
4040
Link<T> prepend(T element) {
4141
print("$element");
@@ -47,14 +47,14 @@ class AbstractLink<T> implements Link<T> {
4747
}
4848

4949
class LinkTail<T> extends AbstractLink<T> implements EmptyLink<T> {
50-
// ^^^^^^^^
51-
// [cfe] The non-abstract class 'LinkTail' is missing implementations for these members:
50+
// ^
51+
// [cfe] The non-abstract class 'LinkTail' is missing implementations for these members:
5252
const LinkTail();
5353
}
5454

5555
class LinkEntry<T> extends AbstractLink<T> {
56-
// ^^^^^^^^^
57-
// [cfe] The non-abstract class 'LinkEntry' is missing implementations for these members:
56+
// ^
57+
// [cfe] The non-abstract class 'LinkEntry' is missing implementations for these members:
5858
LinkEntry(T head, [Link<T>? Tail]);
5959
}
6060

tests/language/factory/factory5_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ class LinkFactory<T> {
1717
// ^^^
1818
// [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_NON_CLASS
1919
// [cfe] Couldn't find constructor 'Foo'.
20-
// ^
2120
// [cfe] Redirection constructor target not found: 'Foo'
2221

2322
LinkFactory._();

tests/language/factory/factory6_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class LinkFactory<T> {
1616
// ^^^
1717
// [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_NON_CLASS
1818
// [cfe] Couldn't find constructor 'Foo'.
19-
// ^
2019
// [cfe] Redirection constructor target not found: 'Foo'
2120
}
2221

tests/language/factory/factory_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,17 @@ abstract class Link<T> {
3737
factory Link.create() = LinkFactory<T>.create;
3838
// ^^^^^^^^^^^^^^
3939
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
40-
// [cfe] Expected 0 type arguments.
4140
// ^^^^^^^^^^^^^^^^^^^^^
4241
// [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE
42+
// [cfe] Expected 0 type arguments.
4343
}
4444

4545
class LinkFactory {
4646
// Compile time error: should be LinkFactory<T> to match abstract class above
4747
factory Link.create() {
48-
// ^^^^
49-
// [analyzer] COMPILE_TIME_ERROR.INVALID_FACTORY_NAME_NOT_A_CLASS
50-
// [cfe] The name of a constructor must match the name of the enclosing class.
48+
// ^^^^
49+
// [analyzer] COMPILE_TIME_ERROR.INVALID_FACTORY_NAME_NOT_A_CLASS
50+
// [cfe] The name of a constructor must match the name of the enclosing class.
5151
return LinkFactory._();
5252
}
5353

tests/language/factory/redirection2_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class Foo {
1313
//^
1414
// [analyzer] SYNTACTIC_ERROR.REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR
1515
// [cfe] Expected a function body or '=>'.
16-
//^
1716
// [cfe] Only factory constructor can specify '=' redirection.
1817
// ^
1918
// [cfe] Constructors can't have a return type.

tests/language/factory/redirection3_cyclic_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ class C implements B {
2828
// [cfe] Expected ';' after this.
2929
// ^
3030
// [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER
31-
// [cfe] Expected an identifier, but got '('.
3231
// ^^^
3332
// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
33+
// [cfe] Expected an identifier, but got '('.
3434
C();
3535
}
3636

tests/language/field/field1_test.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ class C {
99
var a;
1010

1111
get a {
12-
// ^
13-
// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION
14-
// [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_SUBTYPE_SETTER_TYPES
15-
// [cfe] 'a' is already declared in this scope.
12+
//^
13+
// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION
14+
// [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_SUBTYPE_SETTER_TYPES
15+
// [cfe] 'a' is already declared in this scope.
1616
return 1;
1717
}
1818

1919
set a(int val) {
20-
// ^
21-
// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION
22-
// [cfe] Conflicts with the implicit setter of the field 'a'.
20+
//^
21+
// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION
22+
// [cfe] Conflicts with the implicit setter of the field 'a'.
2323
var x = val;
2424
}
2525

tests/language/field/field5_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
class A {
88
var a;
99
int a() {
10-
// ^
11-
// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION
12-
// [cfe] 'a' is already declared in this scope.
10+
//^
11+
// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION
12+
// [cfe] 'a' is already declared in this scope.
1313
return 1;
1414
}
1515
}

tests/language/field/increment_bailout_test.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ class A {
1717
var list;
1818
var node;
1919

20-
A(node)
21-
: node = node,
22-
list = node.outgoing;
20+
A(node) : node = node, list = node.outgoing;
2321

2422
next() {
2523
// dart2js used to update [offset] twice: once in the optimized

0 commit comments

Comments
 (0)