Skip to content

Commit 6ccd2fb

Browse files
munificentCommit Queue
authored andcommitted
Format tests/language/d*.
I removed one clearly dead multitest piece, but otherwise didn't try to clean things up. There's definitely something weird about the dynamic field tests, but I don't even know what they should be doing, so left them alone. Change-Id: Ic80c2b26d640da0aafeededaa981ed8c2fecc93a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406920 Reviewed-by: Lasse Nielsen <[email protected]> Commit-Queue: Bob Nystrom <[email protected]>
1 parent f259e6b commit 6ccd2fb

27 files changed

+127
-121
lines changed

tests/language/deferred/duplicate_prefix1_runtime_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@
77

88
import "prefix_constraints_lib2.dart" as lib;
99

10-
1110
void main() {}

tests/language/deferred/duplicate_prefix2_runtime_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// for details. All rights reserved. Use of this source code is governed by a
66
// BSD-style license that can be found in the LICENSE file.
77

8-
98
import "prefix_constraints_lib2.dart" as lib;
109

1110
void main() {}

tests/language/deferred/duplicate_prefix3_runtime_test.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,4 @@
55
// for details. All rights reserved. Use of this source code is governed by a
66
// BSD-style license that can be found in the LICENSE file.
77

8-
9-
10-
118
void main() {}

tests/language/deferred/function_type_lib.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
import 'package:expect/expect.dart';
66

77
class T {
8-
A foo(int x) { return A(); }
8+
A foo(int x) {
9+
return A();
10+
}
911
}
1012

1113
class A {}

tests/language/deferred/inheritance_constraints_error_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ class C = C1 with lib.Foo;
2929
class D {
3030
D();
3131
factory D.factory() = lib.Foo2;
32-
// ^^^^^^^^
33-
// [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE
34-
// [cfe] The constructor function type 'Foo2 Function()' isn't a subtype of 'D Function()'.
32+
// ^^^^^^^^
33+
// [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE
34+
// [cfe] The constructor function type 'Foo2 Function()' isn't a subtype of 'D Function()'.
3535
}
3636

3737
void main() {

tests/language/deferred/load_constants_test.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,35 +27,35 @@ main() {
2727
Expect.throws(() => const [foo.c]);
2828
// ^
2929
// [cfe] Constant evaluation error:
30-
// ^^^^^
30+
// ^
3131
// [cfe] 'foo' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded.
3232
// ^
3333
// [analyzer] COMPILE_TIME_ERROR.COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY
3434
Expect.throws(() => const [foo.C]);
3535
// ^
3636
// [cfe] Constant evaluation error:
37-
// ^^^^^
37+
// ^
3838
// [cfe] 'foo' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded.
3939
// ^
4040
// [analyzer] COMPILE_TIME_ERROR.COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY
4141
Expect.throws(() => const [foo.funtype]);
4242
// ^
4343
// [cfe] Constant evaluation error:
44-
// ^^^^^^^^^^^
44+
// ^
4545
// [cfe] 'foo' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded.
4646
// ^^^^^^^
4747
// [analyzer] COMPILE_TIME_ERROR.COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY
4848
Expect.throws(() => const [foo.toplevel]);
4949
// ^
5050
// [cfe] Constant evaluation error:
51-
// ^^^^^^^^^^^^
51+
// ^
5252
// [cfe] 'foo' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded.
5353
// ^^^^^^^^
5454
// [analyzer] COMPILE_TIME_ERROR.COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY
5555
Expect.throws(() => const [foo.C.staticfun]);
5656
// ^
5757
// [cfe] Constant evaluation error:
58-
// ^^^^^^^^^^^^^^^
58+
// ^
5959
// [cfe] 'foo' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded.
6060
// ^
6161
// [analyzer] COMPILE_TIME_ERROR.COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY

tests/language/deferred/load_library_wrong_args_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import "load_library_wrong_args_lib.dart" deferred as lib;
33
void main() {
44
// Loadlibrary should be called without arguments.
55
lib.loadLibrary(10);
6-
// ^
7-
// [cfe] 'loadLibrary' takes no arguments.
8-
// ^^
9-
// [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS
6+
// ^
7+
// [cfe] 'loadLibrary' takes no arguments.
8+
// ^^
9+
// [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS
1010
}

tests/language/deferred/no_prefix_runtime_test.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
// BSD-style license that can be found in the LICENSE file.
77

88
// Loading a deferred library without prefix is not allowed.
9-
import "constraints_lib2.dart"
10-
11-
;
9+
import "constraints_lib2.dart";
1210

1311
void main() {}

tests/language/deferred/shared_and_unshared_classes_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ void main() {
1919
}),
2020
lib2.loadLibrary().then((_) {
2121
lib2.foo();
22-
})
22+
}),
2323
]);
2424
});
2525
}

tests/language/deferred/split_constants_canonicalization_test.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@ class Box {
1111
const Box(this.contents);
1212
}
1313

14-
enum Enum {
15-
RED,
16-
GREEN,
17-
BLUE,
18-
}
14+
enum Enum { RED, GREEN, BLUE }
1915

2016
commonClosure() {}
2117

0 commit comments

Comments
 (0)