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 <rnystrom@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
diff --git a/tests/language/unsorted/additional_interface_adds_optional_args_concrete_test.dart b/tests/language/unsorted/additional_interface_adds_optional_args_concrete_test.dart
index 3a89831..4defab0 100644
--- a/tests/language/unsorted/additional_interface_adds_optional_args_concrete_test.dart
+++ b/tests/language/unsorted/additional_interface_adds_optional_args_concrete_test.dart
@@ -11,9 +11,9 @@
}
class B extends A implements I {
-// ^
-// [analyzer] COMPILE_TIME_ERROR.INVALID_IMPLEMENTATION_OVERRIDE
-// [cfe] The implementation of 'foo' in the non-abstract class 'B' does not conform to its interface.
+ // ^
+ // [analyzer] COMPILE_TIME_ERROR.INVALID_IMPLEMENTATION_OVERRIDE
+ // [cfe] The implementation of 'foo' in the non-abstract class 'B' does not conform to its interface.
// This class declaration violates soundness, since it allows `new
// B().foo(42)`, which would lead to invalid arguments being passed to A.foo.
diff --git a/tests/language/unsorted/assignable_expression_runtime_test.dart b/tests/language/unsorted/assignable_expression_runtime_test.dart
index 942cb23..faef7e7 100644
--- a/tests/language/unsorted/assignable_expression_runtime_test.dart
+++ b/tests/language/unsorted/assignable_expression_runtime_test.dart
@@ -17,31 +17,15 @@
main() {
variable = 0;
-
-
-
C.field = 0;
-
-
-
variable = [1, 2, 3];
variable[0] = 0;
(variable)[0] = 0;
-
-
-
C.field = [1, 2, 3];
-
-
-
var a = 0;
-
-
-
// Neat palindrome expression. x is assignable, ((x)) is not.
-
}
diff --git a/tests/language/unsorted/bad_override_runtime_test.dart b/tests/language/unsorted/bad_override_runtime_test.dart
index 1e2abe5..f50c0ca 100644
--- a/tests/language/unsorted/bad_override_runtime_test.dart
+++ b/tests/language/unsorted/bad_override_runtime_test.dart
@@ -10,7 +10,6 @@
set fisk(x) {}
-
get hest => null;
set hest(x) {}
@@ -20,12 +19,7 @@
nullary() {}
}
-class Hest extends Fisk {
-
-
-
-
-}
+class Hest extends Fisk {}
main() {
new Fisk();
diff --git a/tests/language/unsorted/bad_override_test.dart b/tests/language/unsorted/bad_override_test.dart
index fb4368a..9d29638 100644
--- a/tests/language/unsorted/bad_override_test.dart
+++ b/tests/language/unsorted/bad_override_test.dart
@@ -4,16 +4,14 @@
class Fisk {
get fisk => null;
- static
- set fisk(x) {}
- // ^^^^
+ static set fisk(x) {}
+ // ^^^^
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE
// [cfe] Static property 'fisk' conflicts with instance property of the same name.
// [cfe] This static member conflicts with an instance member.
- static
- get hest => null;
- // ^^^^
+ static get hest => null;
+ // ^^^^
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE
// [cfe] This static member conflicts with an instance member.
set hest(x) {}
@@ -32,17 +30,17 @@
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE
// [cfe] Can't declare a member that conflicts with an inherited one.
field() {}
-//^^^^^
-// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_METHOD_AND_FIELD
-// [cfe] Can't declare a member that conflicts with an inherited one.
+ // [error column 3, length 5]
+ // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_METHOD_AND_FIELD
+ // [cfe] Can't declare a member that conflicts with an inherited one.
var method;
// ^^^^^^
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_FIELD_AND_METHOD
// [cfe] Can't declare a member that conflicts with an inherited one.
nullary(x) {}
-//^^^^^^^
-// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
-// [cfe] The method 'Hest.nullary' has more required arguments than those of overridden method 'Fisk.nullary'.
+ // [error column 3, length 7]
+ // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
+ // [cfe] The method 'Hest.nullary' has more required arguments than those of overridden method 'Fisk.nullary'.
}
main() {
diff --git a/tests/language/unsorted/callable_runtime_test.dart b/tests/language/unsorted/callable_runtime_test.dart
index 05fad49..a243026 100644
--- a/tests/language/unsorted/callable_runtime_test.dart
+++ b/tests/language/unsorted/callable_runtime_test.dart
@@ -41,9 +41,6 @@
Function g = y; // Should pass checked mode test
F f0 = y; // Should pass checked mode test
-
-
-
Expect.equals(f(), 42);
Expect.equals(g(100), 187);
diff --git a/tests/language/unsorted/check_member_static_runtime_1_test.dart b/tests/language/unsorted/check_member_static_runtime_1_test.dart
index b9b4391..a8fa9d5 100644
--- a/tests/language/unsorted/check_member_static_runtime_1_test.dart
+++ b/tests/language/unsorted/check_member_static_runtime_1_test.dart
@@ -14,7 +14,6 @@
class C extends B {
var a;
-
}
void main() {
diff --git a/tests/language/unsorted/check_member_static_runtime_test.dart b/tests/language/unsorted/check_member_static_runtime_test.dart
index db884e0..16952d4 100644
--- a/tests/language/unsorted/check_member_static_runtime_test.dart
+++ b/tests/language/unsorted/check_member_static_runtime_test.dart
@@ -12,10 +12,7 @@
class B extends A {}
-class C extends B {
-
-
-}
+class C extends B {}
void main() {
new C();
diff --git a/tests/language/unsorted/check_method_override_runtime_test.dart b/tests/language/unsorted/check_method_override_runtime_test.dart
index e538a33..63f6316 100644
--- a/tests/language/unsorted/check_method_override_runtime_test.dart
+++ b/tests/language/unsorted/check_method_override_runtime_test.dart
@@ -10,10 +10,7 @@
foo(var a, [x, y]) {}
}
-class C extends A {
-
-
-}
+class C extends A {}
main() {
new A().foo(2);
diff --git a/tests/language/unsorted/check_method_override_test.dart b/tests/language/unsorted/check_method_override_test.dart
index a23af64..b4f1e51 100644
--- a/tests/language/unsorted/check_method_override_test.dart
+++ b/tests/language/unsorted/check_method_override_test.dart
@@ -9,13 +9,13 @@
class C extends A {
f() {}
-//^
-// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
-// [cfe] The method 'C.f' has fewer positional arguments than those of overridden method 'A.f'.
+ // [error column 3, length 1]
+ // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
+ // [cfe] The method 'C.f' has fewer positional arguments than those of overridden method 'A.f'.
foo(var a, [x]) {}
-//^^^
-// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
-// [cfe] The method 'C.foo' has fewer positional arguments than those of overridden method 'A.foo'.
+ // [error column 3, length 3]
+ // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
+ // [cfe] The method 'C.foo' has fewer positional arguments than those of overridden method 'A.foo'.
}
main() {
diff --git a/tests/language/unsorted/checked_method_error_order_test.dart b/tests/language/unsorted/checked_method_error_order_test.dart
index 8689027..b9b6ebd 100644
--- a/tests/language/unsorted/checked_method_error_order_test.dart
+++ b/tests/language/unsorted/checked_method_error_order_test.dart
@@ -28,7 +28,8 @@
var m = e.toString();
return m.contains("is not a subtype of type 'int'") ||
m.contains(
- "Expected a value of type 'int', but got one of type 'String'");
+ "Expected a value of type 'int', but got one of type 'String'",
+ );
}
return false;
});
@@ -37,7 +38,8 @@
var m = e.toString();
return m.contains("is not a subtype of type 'int?'") ||
m.contains(
- "Expected a value of type 'int?', but got one of type 'String'");
+ "Expected a value of type 'int?', but got one of type 'String'",
+ );
}
return false;
});
diff --git a/tests/language/unsorted/core_type_check_test.dart b/tests/language/unsorted/core_type_check_test.dart
index 79ea2c5..e5ce54d 100644
--- a/tests/language/unsorted/core_type_check_test.dart
+++ b/tests/language/unsorted/core_type_check_test.dart
@@ -38,7 +38,7 @@
new A(),
new B(),
new C(),
- new D()
+ new D(),
];
check(things[inscrutable(0)], false, false); // List
diff --git a/tests/language/unsorted/cyclic_type2_test.dart b/tests/language/unsorted/cyclic_type2_test.dart
index 5a4d120..071ab49 100644
--- a/tests/language/unsorted/cyclic_type2_test.dart
+++ b/tests/language/unsorted/cyclic_type2_test.dart
@@ -23,16 +23,28 @@
main() {
var d = new Derived1<Derived1, Derived2>();
Expect.equals(
- "Derived1<Derived1<dynamic, dynamic>, Derived2<dynamic, dynamic>>",
- d.u.toString());
+ "Derived1<Derived1<dynamic, dynamic>, Derived2<dynamic, dynamic>>",
+ d.u.toString(),
+ );
Expect.equals(
- "Derived1<Derived2<Derived2<dynamic, dynamic>, "
- "Derived1<dynamic, dynamic>>, Derived2<dynamic, dynamic>>",
- d.v.toString());
+ "Derived1<Derived2<Derived2<dynamic, dynamic>, "
+ "Derived1<dynamic, dynamic>>, Derived2<dynamic, dynamic>>",
+ d.v.toString(),
+ );
Expect.isTrue(d is Derived1<Derived1, Derived2>);
Expect.isFalse(d is Derived1<Derived1, Derived1>);
- Expect.isTrue(d is Base<Derived1<Derived1, Derived2>,
- Derived1<Derived2<Derived2, Derived1>, Derived2>>);
- Expect.isFalse(d is Base<Derived1<Derived1, Derived2>,
- Derived1<Derived2<Derived2, Derived2>, Derived2>>);
+ Expect.isTrue(
+ d
+ is Base<
+ Derived1<Derived1, Derived2>,
+ Derived1<Derived2<Derived2, Derived1>, Derived2>
+ >,
+ );
+ Expect.isFalse(
+ d
+ is Base<
+ Derived1<Derived1, Derived2>,
+ Derived1<Derived2<Derived2, Derived2>, Derived2>
+ >,
+ );
}
diff --git a/tests/language/unsorted/default_implementation_test.dart b/tests/language/unsorted/default_implementation_test.dart
index c40a1ac2..ef17ef5 100644
--- a/tests/language/unsorted/default_implementation_test.dart
+++ b/tests/language/unsorted/default_implementation_test.dart
@@ -13,9 +13,7 @@
}
class PointImplementation implements Point {
- const PointImplementation(int x, int y)
- : this.x = x,
- this.y = y;
+ const PointImplementation(int x, int y) : this.x = x, this.y = y;
final int x;
final int y;
}
diff --git a/tests/language/unsorted/disassemble_test.dart b/tests/language/unsorted/disassemble_test.dart
index 2618d1e..e58e6a2 100644
--- a/tests/language/unsorted/disassemble_test.dart
+++ b/tests/language/unsorted/disassemble_test.dart
@@ -26,7 +26,10 @@
return; // No disassembler in product mode.
}
- final result = await runBinary(Platform.executable,
- ['--disassemble', Platform.script.toFilePath(), '--child']);
+ final result = await runBinary(Platform.executable, [
+ '--disassemble',
+ Platform.script.toFilePath(),
+ '--child',
+ ]);
Expect.equals(0, result.exitCode);
}
diff --git a/tests/language/unsorted/efficient_length_warning_test.dart b/tests/language/unsorted/efficient_length_warning_test.dart
index 5ba2c6f..a3d25df 100644
--- a/tests/language/unsorted/efficient_length_warning_test.dart
+++ b/tests/language/unsorted/efficient_length_warning_test.dart
@@ -9,9 +9,11 @@
// This should no longer cause a warning because the least-upper-bound
// of List<int> and Set<int> is Object.
// The LUB is now EfficientLengthIterable and it extends Iterable.
- var x = (new Random().nextBool() // Unpredictable condition.
- ? <int>[1]
- : new Set<int>.from([1]))
- .first;
+ var x =
+ (new Random()
+ .nextBool() // Unpredictable condition.
+ ? <int>[1]
+ : new Set<int>.from([1]))
+ .first;
if (x != 1) throw "Wat?";
}
diff --git a/tests/language/unsorted/emit_const_fields_test.dart b/tests/language/unsorted/emit_const_fields_test.dart
index 8264c50..946ff69 100644
--- a/tests/language/unsorted/emit_const_fields_test.dart
+++ b/tests/language/unsorted/emit_const_fields_test.dart
@@ -11,7 +11,7 @@
static const EARTH = const {
"Sector": "ZZ9 Plural Z Alpha",
"Status": const ["Scheduled for demolition", "1978-03-08"],
- "Description": "Mostly harmless"
+ "Description": "Mostly harmless",
};
}
diff --git a/tests/language/unsorted/external_runtime_test.dart b/tests/language/unsorted/external_runtime_test.dart
index e51282c..d6cecb2 100644
--- a/tests/language/unsorted/external_runtime_test.dart
+++ b/tests/language/unsorted/external_runtime_test.dart
@@ -16,39 +16,9 @@
Foo() : x = 0;
// fields can't be declared external
-
-
-
-
-
-
-
-
-
-
-
-
-
}
-
-
-
main() {
// Ensure Foo class is compiled.
var foo = new Foo();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
}
diff --git a/tests/language/unsorted/fauxverride_runtime_test.dart b/tests/language/unsorted/fauxverride_runtime_test.dart
index d5ae11a..e1b6f42 100644
--- a/tests/language/unsorted/fauxverride_runtime_test.dart
+++ b/tests/language/unsorted/fauxverride_runtime_test.dart
@@ -82,7 +82,6 @@
// name. Furthermore, according to 7.7 a static variable induces an
// implicit getter function (a static method).
-
foo() => 'foo';
}
diff --git a/tests/language/unsorted/fauxverride_test.dart b/tests/language/unsorted/fauxverride_test.dart
index d5fc6b1..f186e67 100644
--- a/tests/language/unsorted/fauxverride_test.dart
+++ b/tests/language/unsorted/fauxverride_test.dart
@@ -67,11 +67,10 @@
// According to 7.1, instance methods include those of the
// superclass, and according to 7, it is a compile-time to have an
// instance method and static method with the same name.
- static
- instanceMethod() => m();
-//^^^^^^^^^^^^^^
-// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE
-// [cfe] Can't declare a member that conflicts with an inherited one.
+ static instanceMethod() => m();
+ // ^^^^^^^^^^^^^^
+ // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE
+ // [cfe] Can't declare a member that conflicts with an inherited one.
// According to 7.7, static variables are not inherited.
static i2() => m();
diff --git a/tests/language/unsorted/guess_cid_test.dart b/tests/language/unsorted/guess_cid_test.dart
index 9d62a8a..e3d2816 100644
--- a/tests/language/unsorted/guess_cid_test.dart
+++ b/tests/language/unsorted/guess_cid_test.dart
@@ -71,10 +71,14 @@
// Foul up IC data in integer's unary minus.
var y = -0x80000000;
Expect.equals(
- (0x7fffffffffffffff + 2) * 10, testLoop(10, 0x7fffffffffffffff));
+ (0x7fffffffffffffff + 2) * 10,
+ testLoop(10, 0x7fffffffffffffff),
+ );
// Second time no deoptimization can occur, since runtime feedback has been collected.
Expect.equals(
- (0x7fffffffffffffff + 2) * 10, testLoop(10, 0x7fffffffffffffff));
+ (0x7fffffffffffffff + 2) * 10,
+ testLoop(10, 0x7fffffffffffffff),
+ );
}
testLoop(N, int x) {
diff --git a/tests/language/unsorted/illegal_invocation_runtime_test.dart b/tests/language/unsorted/illegal_invocation_runtime_test.dart
index 41f46b0..937f879 100644
--- a/tests/language/unsorted/illegal_invocation_runtime_test.dart
+++ b/tests/language/unsorted/illegal_invocation_runtime_test.dart
@@ -9,10 +9,7 @@
// Test for issue 1393. Invoking a library prefix name caused an internal error
// in dartc.
-
-
main() {
// probably what the user meant was foo.foo(), but the qualifier refers
// to the library prefix, not the method defined within the library.
-
}
diff --git a/tests/language/unsorted/illegal_invocation_test.dart b/tests/language/unsorted/illegal_invocation_test.dart
index 7af9479..6b9ab09 100644
--- a/tests/language/unsorted/illegal_invocation_test.dart
+++ b/tests/language/unsorted/illegal_invocation_test.dart
@@ -12,7 +12,7 @@
// probably what the user meant was foo.foo(), but the qualifier refers
// to the library prefix, not the method defined within the library.
foo();
-//^^^
-// [analyzer] COMPILE_TIME_ERROR.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT
-// [cfe] A prefix can't be used as an expression.
+ // [error column 3, length 3]
+ // [analyzer] COMPILE_TIME_ERROR.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT
+ // [cfe] A prefix can't be used as an expression.
}
diff --git a/tests/language/unsorted/inference_enum_list_test.dart b/tests/language/unsorted/inference_enum_list_test.dart
index 0502272..9c5bf5f 100644
--- a/tests/language/unsorted/inference_enum_list_test.dart
+++ b/tests/language/unsorted/inference_enum_list_test.dart
@@ -3,7 +3,9 @@
// BSD-style license that can be found in the LICENSE file.
enum E1 { a, b }
+
enum E2 { a, b }
+
enum E3 { a, b }
var v = [E1.a, E2.b];
diff --git a/tests/language/unsorted/inv_cse_licm_test.dart b/tests/language/unsorted/inv_cse_licm_test.dart
index 78b73ed..751d4a8 100644
--- a/tests/language/unsorted/inv_cse_licm_test.dart
+++ b/tests/language/unsorted/inv_cse_licm_test.dart
@@ -225,16 +225,22 @@
Expect.throwsTypeError(() {
cse1(null, 1);
});
- Expect.throws(() {
- cse1(x, 0);
- }, (e) {
- return e is RangeError;
- });
- Expect.throws(() {
- cse1(x, 1);
- }, (e) {
- return e is RangeError;
- });
+ Expect.throws(
+ () {
+ cse1(x, 0);
+ },
+ (e) {
+ return e is RangeError;
+ },
+ );
+ Expect.throws(
+ () {
+ cse1(x, 1);
+ },
+ (e) {
+ return e is RangeError;
+ },
+ );
Expect.equals(1, cse1(a, 0));
Expect.equals(137, cse1(a, 16));
@@ -244,16 +250,22 @@
Expect.throwsTypeError(() {
cse2(null, 1);
});
- Expect.throws(() {
- cse2(x, 0);
- }, (e) {
- return e is RangeError;
- });
- Expect.throws(() {
- cse2(x, 1);
- }, (e) {
- return e is RangeError;
- });
+ Expect.throws(
+ () {
+ cse2(x, 0);
+ },
+ (e) {
+ return e is RangeError;
+ },
+ );
+ Expect.throws(
+ () {
+ cse2(x, 1);
+ },
+ (e) {
+ return e is RangeError;
+ },
+ );
Expect.equals(1, cse2(a, 0));
Expect.equals(1, cse2(a, 16));
Expect.equals(2, a[0]);
@@ -266,22 +278,28 @@
licm1(null, 1);
});
Expect.equals(0, licm1(x, 0));
- Expect.throws(() {
- licm1(x, 1);
- }, (e) {
- return e is RangeError;
- });
+ Expect.throws(
+ () {
+ licm1(x, 1);
+ },
+ (e) {
+ return e is RangeError;
+ },
+ );
Expect.equals(0, licm1(a, 0));
Expect.equals(94, licm1(a, 16));
Expect.throwsTypeError(() {
licm2(null);
});
- Expect.throws(() {
- licm2(x);
- }, (e) {
- return e is RangeError;
- });
+ Expect.throws(
+ () {
+ licm2(x);
+ },
+ (e) {
+ return e is RangeError;
+ },
+ );
Expect.equals(94, licm2(a));
Expect.equals(0, licm3(null, false));
@@ -289,11 +307,14 @@
licm3(null, true);
});
Expect.equals(0, licm3(x, false));
- Expect.throws(() {
- licm3(x, true);
- }, (e) {
- return e is RangeError;
- });
+ Expect.throws(
+ () {
+ licm3(x, true);
+ },
+ (e) {
+ return e is RangeError;
+ },
+ );
Expect.equals(0, licm3(a, false));
Expect.equals(94, licm3(a, true));
@@ -302,11 +323,14 @@
licm3_brk(null, false);
});
Expect.equals(0, licm3_brk(x, true));
- Expect.throws(() {
- licm3_brk(x, false);
- }, (e) {
- return e is RangeError;
- });
+ Expect.throws(
+ () {
+ licm3_brk(x, false);
+ },
+ (e) {
+ return e is RangeError;
+ },
+ );
Expect.equals(0, licm3_brk(a, true));
Expect.equals(94, licm3_brk(a, false));
@@ -315,11 +339,14 @@
licm4(null);
});
Expect.equals(1, global);
- Expect.throws(() {
- licm4(x);
- }, (e) {
- return e is RangeError;
- });
+ Expect.throws(
+ () {
+ licm4(x);
+ },
+ (e) {
+ return e is RangeError;
+ },
+ );
Expect.equals(2, global);
Expect.equals(94, licm4(a));
Expect.equals(18, global);
@@ -327,11 +354,14 @@
Expect.throwsTypeError(() {
licm5(null);
});
- Expect.throws(() {
- licm5(x);
- }, (e) {
- return e is RangeError;
- });
+ Expect.throws(
+ () {
+ licm5(x);
+ },
+ (e) {
+ return e is RangeError;
+ },
+ );
Expect.equals(3, licm5(a));
Expect.throwsTypeError(() {
@@ -340,16 +370,22 @@
Expect.throwsTypeError(() {
licm6(null, 1);
});
- Expect.throws(() {
- licm6(x, 0);
- }, (e) {
- return e is RangeError;
- });
- Expect.throws(() {
- licm6(x, 1);
- }, (e) {
- return e is RangeError;
- });
+ Expect.throws(
+ () {
+ licm6(x, 0);
+ },
+ (e) {
+ return e is RangeError;
+ },
+ );
+ Expect.throws(
+ () {
+ licm6(x, 1);
+ },
+ (e) {
+ return e is RangeError;
+ },
+ );
Expect.equals(4, licm6(a, 0));
Expect.equals(94, licm6(a, 16));
@@ -359,16 +395,22 @@
Expect.throwsTypeError(() {
licm7(null, 1);
});
- Expect.throws(() {
- licm7(x, 0);
- }, (e) {
- return e is RangeError;
- });
- Expect.throws(() {
- licm7(x, 1);
- }, (e) {
- return e is RangeError;
- });
+ Expect.throws(
+ () {
+ licm7(x, 0);
+ },
+ (e) {
+ return e is RangeError;
+ },
+ );
+ Expect.throws(
+ () {
+ licm7(x, 1);
+ },
+ (e) {
+ return e is RangeError;
+ },
+ );
Expect.equals(4, licm7(a, 0));
Expect.equals(94, licm7(a, 16));
@@ -377,22 +419,28 @@
licm8(null, 1);
});
Expect.equals(0, licm8(x, 0));
- Expect.throws(() {
- licm8(x, 1);
- }, (e) {
- return e is RangeError;
- });
+ Expect.throws(
+ () {
+ licm8(x, 1);
+ },
+ (e) {
+ return e is RangeError;
+ },
+ );
Expect.equals(0, licm8(a, 0));
Expect.equals(94, licm8(a, 16));
Expect.throwsTypeError(() {
licm9(null);
});
- Expect.throws(() {
- licm9(x);
- }, (e) {
- return e is RangeError;
- });
+ Expect.throws(
+ () {
+ licm9(x);
+ },
+ (e) {
+ return e is RangeError;
+ },
+ );
Expect.equals(94, licm9(a));
Expect.equals(0, licm10(null, false));
@@ -400,11 +448,14 @@
licm10(null, true);
});
Expect.equals(0, licm10(x, false));
- Expect.throws(() {
- licm10(x, true);
- }, (e) {
- return e is RangeError;
- });
+ Expect.throws(
+ () {
+ licm10(x, true);
+ },
+ (e) {
+ return e is RangeError;
+ },
+ );
Expect.equals(0, licm10(a, false));
Expect.equals(94, licm10(a, true));
@@ -413,22 +464,28 @@
licm10_brk(null, false);
});
Expect.equals(0, licm10_brk(x, true));
- Expect.throws(() {
- licm10_brk(x, false);
- }, (e) {
- return e is RangeError;
- });
+ Expect.throws(
+ () {
+ licm10_brk(x, false);
+ },
+ (e) {
+ return e is RangeError;
+ },
+ );
Expect.equals(0, licm10_brk(a, true));
Expect.equals(94, licm10_brk(a, false));
Expect.throwsTypeError(() {
licm11(null);
});
- Expect.throws(() {
- licm11(x);
- }, (e) {
- return e is RangeError;
- });
+ Expect.throws(
+ () {
+ licm11(x);
+ },
+ (e) {
+ return e is RangeError;
+ },
+ );
Expect.equals(4, licm11(a));
global = 0;
@@ -441,11 +498,14 @@
licm12(null);
});
Expect.equals(15, global);
- Expect.throws(() {
- licm12(x);
- }, (e) {
- return e is RangeError;
- });
+ Expect.throws(
+ () {
+ licm12(x);
+ },
+ (e) {
+ return e is RangeError;
+ },
+ );
Expect.equals(14, global);
Expect.equals(28, licm12(a));
Expect.equals(8, global);
diff --git a/tests/language/unsorted/invalid_cast_runtime_1_test.dart b/tests/language/unsorted/invalid_cast_runtime_1_test.dart
index 179a739..cde2691 100644
--- a/tests/language/unsorted/invalid_cast_runtime_1_test.dart
+++ b/tests/language/unsorted/invalid_cast_runtime_1_test.dart
@@ -21,16 +21,7 @@
test() {
void localFunction(int i) {}
-
-
-
D e = new C.fact() as D;
-
-
-
-
-
-
}
main() {}
diff --git a/tests/language/unsorted/invalid_cast_runtime_2_test.dart b/tests/language/unsorted/invalid_cast_runtime_2_test.dart
index 7f6120c..c010346 100644
--- a/tests/language/unsorted/invalid_cast_runtime_2_test.dart
+++ b/tests/language/unsorted/invalid_cast_runtime_2_test.dart
@@ -21,16 +21,7 @@
test() {
void localFunction(int i) {}
-
-
-
-
D f = new C.fact2() as D;
-
-
-
-
-
}
main() {}
diff --git a/tests/language/unsorted/invalid_cast_runtime_test.dart b/tests/language/unsorted/invalid_cast_runtime_test.dart
index 44f5851..28b0326 100644
--- a/tests/language/unsorted/invalid_cast_runtime_test.dart
+++ b/tests/language/unsorted/invalid_cast_runtime_test.dart
@@ -20,17 +20,6 @@
test() {
void localFunction(int i) {}
-
-
-
-
-
-
-
-
-
-
-
}
main() {}
diff --git a/tests/language/unsorted/invalid_type_argument_count_runtime_test.dart b/tests/language/unsorted/invalid_type_argument_count_runtime_test.dart
index a0959a8..a39b1c0 100644
--- a/tests/language/unsorted/invalid_type_argument_count_runtime_test.dart
+++ b/tests/language/unsorted/invalid_type_argument_count_runtime_test.dart
@@ -7,14 +7,12 @@
// Test top level field.
dynamic // Formatter shouldn't join this line.
-
- x1 = 42;
+x1 = 42;
class Foo {
// Test class member.
dynamic // Formatter shouldn't join this line.
-
- x2 = 42;
+ x2 = 42;
Foo() {
print(x2);
@@ -28,8 +26,7 @@
// Test local variable.
dynamic // Formatter shouldn't join this line.
-
- x3 = 42;
+ x3 = 42;
print(x3);
foo(42);
@@ -37,8 +34,8 @@
// Test parameter.
void foo(
- dynamic // Formatter shouldn't join this line.
-
- x4) {
+ dynamic // Formatter shouldn't join this line.
+ x4,
+) {
print(x4);
}
diff --git a/tests/language/unsorted/invalid_type_argument_count_test.dart b/tests/language/unsorted/invalid_type_argument_count_test.dart
index cf9619d..5607dd9 100644
--- a/tests/language/unsorted/invalid_type_argument_count_test.dart
+++ b/tests/language/unsorted/invalid_type_argument_count_test.dart
@@ -4,16 +4,16 @@
// Test top level field.
dynamic<int> x1 = 42;
-// [error line 6, column 1, length 12]
+// [error column 1, length 12]
// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
// [cfe] Expected 0 type arguments.
class Foo {
// Test class member.
dynamic<int> x2 = 42;
-// [error line 13, column 3, length 12]
-// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
-// [cfe] Expected 0 type arguments.
+ // [error column 3, length 12]
+ // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+ // [cfe] Expected 0 type arguments.
Foo() {
print(x2);
@@ -27,9 +27,9 @@
// Test local variable.
dynamic<int> x3 = 42;
-// [error line 29, column 3, length 12]
-// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
-// [cfe] Expected 0 type arguments.
+ // [error column 3, length 12]
+ // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+ // [cfe] Expected 0 type arguments.
print(x3);
foo(42);
@@ -37,8 +37,8 @@
// Test parameter.
void foo(dynamic<int> x4) {
-// [error line 39, column 10, length 12]
-// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
-// [cfe] Expected 0 type arguments.
+ // ^^^^^^^^^^^^
+ // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+ // [cfe] Expected 0 type arguments.
print(x4);
}
diff --git a/tests/language/unsorted/invocation_mirror_test.dart b/tests/language/unsorted/invocation_mirror_test.dart
index c02d33d..b20267c 100644
--- a/tests/language/unsorted/invocation_mirror_test.dart
+++ b/tests/language/unsorted/invocation_mirror_test.dart
@@ -57,8 +57,13 @@
* Call without optionals for getters, with only positional for setters,
* and with both optionals for everything else.
*/
-testInvocationMirror(Invocation im, Symbol name,
- [List? positional, List? named, List? typeArgs]) {
+testInvocationMirror(
+ Invocation im,
+ Symbol name, [
+ List? positional,
+ List? named,
+ List? typeArgs,
+]) {
Expect.isTrue(im is Invocation, "is Invocation");
Expect.equals(name, im.memberName, "name");
if (named == null) {
@@ -75,7 +80,10 @@
Expect.isFalse(im.isGetter, "$name:isGetter");
Expect.equals(1, im.positionalArguments.length, "$name:#positional");
Expect.equals(
- positional[0], im.positionalArguments[0], "$name:positional[0]");
+ positional[0],
+ im.positionalArguments[0],
+ "$name:positional[0]",
+ );
Expect.equals(0, im.namedArguments.length, "$name:#named");
return;
}
@@ -88,10 +96,15 @@
Expect.listEquals(positional!, im.positionalArguments);
Expect.equals(
- namedArguments.length, im.namedArguments.length, "$name:#named");
+ namedArguments.length,
+ im.namedArguments.length,
+ "$name:#named",
+ );
namedArguments.forEach((k, v) {
Expect.isTrue(
- im.namedArguments.containsKey(k), "$name:?namedArguments[$k]");
+ im.namedArguments.containsKey(k),
+ "$name:?namedArguments[$k]",
+ );
Expect.equals(v, im.namedArguments[k], "$name:namedArguments[$k]");
});
var imTypeArgs = (im as dynamic).typeArguments as List<Type>;
@@ -108,10 +121,16 @@
testInvocationMirror((n..bar = 42).last, const Symbol('bar='), [42]);
testInvocationMirror(n.bar(), const Symbol('bar'), [], []);
testInvocationMirror(n.bar(42), const Symbol('bar'), [42], []);
+ testInvocationMirror(n.bar(x: 42), const Symbol('bar'), [], [
+ const Symbol("x"),
+ 42,
+ ]);
testInvocationMirror(
- n.bar(x: 42), const Symbol('bar'), [], [const Symbol("x"), 42]);
- testInvocationMirror(
- n.bar(37, x: 42), const Symbol('bar'), [37], [const Symbol("x"), 42]);
+ n.bar(37, x: 42),
+ const Symbol('bar'),
+ [37],
+ [const Symbol("x"), 42],
+ );
// Missing operator access.
testInvocationMirror(n + 4, const Symbol('+'), [4], []);
@@ -123,40 +142,70 @@
// Calling as function when it's not.
testInvocationMirror(n(), const Symbol('call'), [], []);
testInvocationMirror(n(42), const Symbol('call'), [42], []);
+ testInvocationMirror(n(x: 42), const Symbol('call'), [], [
+ const Symbol("x"),
+ 42,
+ ]);
testInvocationMirror(
- n(x: 42), const Symbol('call'), [], [const Symbol("x"), 42]);
- testInvocationMirror(
- n(37, x: 42), const Symbol('call'), [37], [const Symbol("x"), 42]);
+ n(37, x: 42),
+ const Symbol('call'),
+ [37],
+ [const Symbol("x"), 42],
+ );
// Calling with arguments not matching existing call method.
testInvocationMirror(c(), const Symbol('call'), [], []);
testInvocationMirror(c(37, 42), const Symbol('call'), [37, 42], []);
+ testInvocationMirror(c(x: 42), const Symbol('call'), [], [
+ const Symbol("x"),
+ 42,
+ ]);
testInvocationMirror(
- c(x: 42), const Symbol('call'), [], [const Symbol("x"), 42]);
- testInvocationMirror(
- c(37, x: 42), const Symbol('call'), [37], [const Symbol("x"), 42]);
+ c(37, x: 42),
+ const Symbol('call'),
+ [37],
+ [const Symbol("x"), 42],
+ );
// Wrong arguments to existing function.
testInvocationMirror(n.flif(), const Symbol("flif"), [], []);
testInvocationMirror(n.flif(37, 42), const Symbol("flif"), [37, 42], []);
+ testInvocationMirror(n.flif(x: 42), const Symbol("flif"), [], [
+ const Symbol("x"),
+ 42,
+ ]);
testInvocationMirror(
- n.flif(x: 42), const Symbol("flif"), [], [const Symbol("x"), 42]);
- testInvocationMirror(
- n.flif(37, x: 42), const Symbol("flif"), [37], [const Symbol("x"), 42]);
+ n.flif(37, x: 42),
+ const Symbol("flif"),
+ [37],
+ [const Symbol("x"), 42],
+ );
testInvocationMirror((n..flif = 42).last, const Symbol("flif="), [42]);
testInvocationMirror(n.flaf(37, 42), const Symbol("flaf"), [37, 42], []);
+ testInvocationMirror(n.flaf(x: 42), const Symbol("flaf"), [], [
+ const Symbol("x"),
+ 42,
+ ]);
testInvocationMirror(
- n.flaf(x: 42), const Symbol("flaf"), [], [const Symbol("x"), 42]);
- testInvocationMirror(
- n.flaf(37, x: 42), const Symbol("flaf"), [37], [const Symbol("x"), 42]);
+ n.flaf(37, x: 42),
+ const Symbol("flaf"),
+ [37],
+ [const Symbol("x"), 42],
+ );
testInvocationMirror((n..flaf = 42).last, const Symbol("flaf="), [42]);
testInvocationMirror(n.flof(37, 42), const Symbol("flof"), [37, 42], []);
+ testInvocationMirror(n.flof(x: 42), const Symbol("flof"), [], [
+ const Symbol("x"),
+ 42,
+ ]);
testInvocationMirror(
- n.flof(x: 42), const Symbol("flof"), [], [const Symbol("x"), 42]);
- testInvocationMirror(
- n.flof(37, y: 42), const Symbol("flof"), [37], [const Symbol("y"), 42]);
+ n.flof(37, y: 42),
+ const Symbol("flof"),
+ [37],
+ [const Symbol("y"), 42],
+ );
testInvocationMirror((n..flof = 42).last, const Symbol("flof="), [42]);
// Reading works.
@@ -174,12 +223,22 @@
// Calling noSuchMethod itself, badly.
testInvocationMirror(n.noSuchMethod(), const Symbol("noSuchMethod"), [], []);
+ testInvocationMirror(n.noSuchMethod(37, 42), const Symbol("noSuchMethod"), [
+ 37,
+ 42,
+ ], []);
testInvocationMirror(
- n.noSuchMethod(37, 42), const Symbol("noSuchMethod"), [37, 42], []);
- testInvocationMirror(n.noSuchMethod(37, x: 42), const Symbol("noSuchMethod"),
- [37], [const Symbol("x"), 42]);
- testInvocationMirror(n.noSuchMethod(x: 42), const Symbol("noSuchMethod"), [],
- [const Symbol("x"), 42]);
+ n.noSuchMethod(37, x: 42),
+ const Symbol("noSuchMethod"),
+ [37],
+ [const Symbol("x"), 42],
+ );
+ testInvocationMirror(
+ n.noSuchMethod(x: 42),
+ const Symbol("noSuchMethod"),
+ [],
+ [const Symbol("x"), 42],
+ );
// Closurizing a method means that calling it badly will not hit the
// original receivers noSuchMethod, only the one inherited from Object
@@ -199,58 +258,103 @@
// Missing property/method access.
dynamic self = this;
testInvocationMirror(self.bar, const Symbol('bar'));
- testInvocationMirror(() {
- self.bar = 42;
- return last;
- }(), const Symbol('bar='), [42]);
+ testInvocationMirror(
+ () {
+ self.bar = 42;
+ return last;
+ }(),
+ const Symbol('bar='),
+ [42],
+ );
testInvocationMirror(self.bar(), const Symbol('bar'), [], []);
testInvocationMirror(self.bar(42), const Symbol('bar'), [42], []);
+ testInvocationMirror(self.bar(x: 42), const Symbol('bar'), [], [
+ const Symbol("x"),
+ 42,
+ ]);
testInvocationMirror(
- self.bar(x: 42), const Symbol('bar'), [], [const Symbol("x"), 42]);
- testInvocationMirror(self.bar(37, x: 42), const Symbol('bar'), [37],
- [const Symbol("x"), 42]);
+ self.bar(37, x: 42),
+ const Symbol('bar'),
+ [37],
+ [const Symbol("x"), 42],
+ );
// Missing operator access.
testInvocationMirror(self + 4, const Symbol('+'), [4], []);
testInvocationMirror(self - 4, const Symbol('-'), [4], []);
testInvocationMirror(-self, const Symbol('unary-'), [], []);
testInvocationMirror(self[42], const Symbol('[]'), [42], []);
- testInvocationMirror(() {
- self[37] = 42;
- return last;
- }(), const Symbol('[]='), [37, 42], []);
+ testInvocationMirror(
+ () {
+ self[37] = 42;
+ return last;
+ }(),
+ const Symbol('[]='),
+ [37, 42],
+ [],
+ );
// Wrong arguments to existing function.
testInvocationMirror(self.flif(), const Symbol("flif"), [], []);
testInvocationMirror(self.flif(37, 42), const Symbol("flif"), [37, 42], []);
+ testInvocationMirror(self.flif(x: 42), const Symbol("flif"), [], [
+ const Symbol("x"),
+ 42,
+ ]);
testInvocationMirror(
- self.flif(x: 42), const Symbol("flif"), [], [const Symbol("x"), 42]);
- testInvocationMirror(self.flif(37, x: 42), const Symbol("flif"), [37],
- [const Symbol("x"), 42]);
- testInvocationMirror(() {
- self.flif = 42;
- return last;
- }(), const Symbol("flif="), [42]);
+ self.flif(37, x: 42),
+ const Symbol("flif"),
+ [37],
+ [const Symbol("x"), 42],
+ );
+ testInvocationMirror(
+ () {
+ self.flif = 42;
+ return last;
+ }(),
+ const Symbol("flif="),
+ [42],
+ );
testInvocationMirror(self.flaf(37, 42), const Symbol("flaf"), [37, 42], []);
+ testInvocationMirror(self.flaf(x: 42), const Symbol("flaf"), [], [
+ const Symbol("x"),
+ 42,
+ ]);
testInvocationMirror(
- self.flaf(x: 42), const Symbol("flaf"), [], [const Symbol("x"), 42]);
- testInvocationMirror(self.flaf(37, x: 42), const Symbol("flaf"), [37],
- [const Symbol("x"), 42]);
- testInvocationMirror(() {
- self.flaf = 42;
- return last;
- }(), const Symbol("flaf="), [42]);
+ self.flaf(37, x: 42),
+ const Symbol("flaf"),
+ [37],
+ [const Symbol("x"), 42],
+ );
+ testInvocationMirror(
+ () {
+ self.flaf = 42;
+ return last;
+ }(),
+ const Symbol("flaf="),
+ [42],
+ );
testInvocationMirror(self.flof(37, 42), const Symbol("flof"), [37, 42], []);
+ testInvocationMirror(self.flof(x: 42), const Symbol("flof"), [], [
+ const Symbol("x"),
+ 42,
+ ]);
testInvocationMirror(
- self.flof(x: 42), const Symbol("flof"), [], [const Symbol("x"), 42]);
- testInvocationMirror(self.flof(37, y: 42), const Symbol("flof"), [37],
- [const Symbol("y"), 42]);
- testInvocationMirror(() {
- self.flof = 42;
- return last;
- }(), const Symbol("flof="), [42]);
+ self.flof(37, y: 42),
+ const Symbol("flof"),
+ [37],
+ [const Symbol("y"), 42],
+ );
+ testInvocationMirror(
+ () {
+ self.flof = 42;
+ return last;
+ }(),
+ const Symbol("flof="),
+ [42],
+ );
// Reading works.
Expect.isTrue(self.flif is Function);
@@ -258,28 +362,56 @@
Expect.isTrue(self.flof is Function);
// Writing to read-only fields.
- testInvocationMirror(() {
- self.wut = 42;
- return last;
- }(), const Symbol("wut="), [42]);
- testInvocationMirror(() {
- self.plif = 42;
- return last;
- }(), const Symbol("plif="), [42]);
- testInvocationMirror(() {
- self.plaf = 42;
- return last;
- }(), const Symbol("plaf="), [42]);
+ testInvocationMirror(
+ () {
+ self.wut = 42;
+ return last;
+ }(),
+ const Symbol("wut="),
+ [42],
+ );
+ testInvocationMirror(
+ () {
+ self.plif = 42;
+ return last;
+ }(),
+ const Symbol("plif="),
+ [42],
+ );
+ testInvocationMirror(
+ () {
+ self.plaf = 42;
+ return last;
+ }(),
+ const Symbol("plaf="),
+ [42],
+ );
// Calling noSuchMethod itself, badly.
testInvocationMirror(
- self.noSuchMethod(), const Symbol("noSuchMethod"), [], []);
+ self.noSuchMethod(),
+ const Symbol("noSuchMethod"),
+ [],
+ [],
+ );
testInvocationMirror(
- self.noSuchMethod(37, 42), const Symbol("noSuchMethod"), [37, 42], []);
- testInvocationMirror(self.noSuchMethod(37, x: 42),
- const Symbol("noSuchMethod"), [37], [const Symbol("x"), 42]);
- testInvocationMirror(self.noSuchMethod(x: 42), const Symbol("noSuchMethod"),
- [], [const Symbol("x"), 42]);
+ self.noSuchMethod(37, 42),
+ const Symbol("noSuchMethod"),
+ [37, 42],
+ [],
+ );
+ testInvocationMirror(
+ self.noSuchMethod(37, x: 42),
+ const Symbol("noSuchMethod"),
+ [37],
+ [const Symbol("x"), 42],
+ );
+ testInvocationMirror(
+ self.noSuchMethod(x: 42),
+ const Symbol("noSuchMethod"),
+ [],
+ [const Symbol("x"), 42],
+ );
// Closurizing a method means that calling it badly will not hit the
// original receivers noSuchMethod, only the one inherited from Object
@@ -307,7 +439,9 @@
Expect.throwsNoSuchMethodError(() => o.toString(42));
Expect.throwsNoSuchMethodError(() => o.toString(x: 37));
Expect.throwsNoSuchMethodError(() => o.hashCode = 42);
- Expect.throwsNoSuchMethodError(() => (n.flif)()); // Extracted method has no noSuchMethod.
+ Expect.throwsNoSuchMethodError(
+ () => (n.flif)(),
+ ); // Extracted method has no noSuchMethod.
}
main() {
diff --git a/tests/language/unsorted/large_implicit_getter_test.dart b/tests/language/unsorted/large_implicit_getter_test.dart
index 624a063..f07009c 100644
--- a/tests/language/unsorted/large_implicit_getter_test.dart
+++ b/tests/language/unsorted/large_implicit_getter_test.dart
@@ -1365,7 +1365,7 @@
[2364.4759911280776, 3677.1700224365045],
[2463.7759911280773, 3842.7700224365044],
[2463.7759911280773, 4008.3700224365043],
- [2364.4759911280776, 3842.7700224365044]
+ [2364.4759911280776, 3842.7700224365044],
];
main() {
diff --git a/tests/language/unsorted/larger_implicit_getter_test.dart b/tests/language/unsorted/larger_implicit_getter_test.dart
index cfadc00..9956ec2 100644
--- a/tests/language/unsorted/larger_implicit_getter_test.dart
+++ b/tests/language/unsorted/larger_implicit_getter_test.dart
@@ -4088,7 +4088,7 @@
[2364.4759911280776, 3677.1700224365045],
[2463.7759911280773, 3842.7700224365044],
[2463.7759911280773, 4008.3700224365043],
- [2364.4759911280776, 3842.7700224365044]
+ [2364.4759911280776, 3842.7700224365044],
];
@pragma('dart2js:assumeDynamic')
diff --git a/tests/language/unsorted/many_named_arguments_test.dart b/tests/language/unsorted/many_named_arguments_test.dart
index ed239a4..2aecb8d 100644
--- a/tests/language/unsorted/many_named_arguments_test.dart
+++ b/tests/language/unsorted/many_named_arguments_test.dart
@@ -5,33 +5,34 @@
import 'package:expect/expect.dart';
class Fisk {
- method(
- {a = 'a',
- b = 'b',
- c = 'c',
- d = 'd',
- e = 'e',
- f = 'f',
- g = 'g',
- h = 'h',
- i = 'i',
- j = 'j',
- k = 'k',
- l = 'l',
- m = 'm',
- n = 'n',
- o = 'o',
- p = 'p',
- q = 'q',
- r = 'r',
- s = 's',
- t = 't',
- u = 'u',
- v = 'v',
- w = 'w',
- x = 'x',
- y = 'y',
- z = 'z'}) {
+ method({
+ a = 'a',
+ b = 'b',
+ c = 'c',
+ d = 'd',
+ e = 'e',
+ f = 'f',
+ g = 'g',
+ h = 'h',
+ i = 'i',
+ j = 'j',
+ k = 'k',
+ l = 'l',
+ m = 'm',
+ n = 'n',
+ o = 'o',
+ p = 'p',
+ q = 'q',
+ r = 'r',
+ s = 's',
+ t = 't',
+ u = 'u',
+ v = 'v',
+ w = 'w',
+ x = 'x',
+ y = 'y',
+ z = 'z',
+ }) {
return 'a: $a, '
'b: $b, '
'c: $c, '
@@ -66,39 +67,44 @@
var namedArguments = new Map<Symbol, dynamic>();
namedArguments[const Symbol('a')] = 'a';
Expect.stringEquals(
- EXPECTED_RESULT, Function.apply(method, [], namedArguments));
+ EXPECTED_RESULT,
+ Function.apply(method, [], namedArguments),
+ );
Expect.stringEquals(
- EXPECTED_RESULT,
- new Fisk().method(
- a: 'a',
- b: 'b',
- c: 'c',
- d: 'd',
- e: 'e',
- f: 'f',
- g: 'g',
- h: 'h',
- i: 'i',
- j: 'j',
- k: 'k',
- l: 'l',
- m: 'm',
- n: 'n',
- o: 'o',
- p: 'p',
- q: 'q',
- r: 'r',
- s: 's',
- t: 't',
- u: 'u',
- v: 'v',
- w: 'w',
- x: 'x',
- y: 'y',
- z: 'z'));
+ EXPECTED_RESULT,
+ new Fisk().method(
+ a: 'a',
+ b: 'b',
+ c: 'c',
+ d: 'd',
+ e: 'e',
+ f: 'f',
+ g: 'g',
+ h: 'h',
+ i: 'i',
+ j: 'j',
+ k: 'k',
+ l: 'l',
+ m: 'm',
+ n: 'n',
+ o: 'o',
+ p: 'p',
+ q: 'q',
+ r: 'r',
+ s: 's',
+ t: 't',
+ u: 'u',
+ v: 'v',
+ w: 'w',
+ x: 'x',
+ y: 'y',
+ z: 'z',
+ ),
+ );
}
-const String EXPECTED_RESULT = 'a: a, '
+const String EXPECTED_RESULT =
+ 'a: a, '
'b: b, '
'c: c, '
'd: d, '
diff --git a/tests/language/unsorted/third_test.dart b/tests/language/unsorted/third_test.dart
index 3df66d3..bf3cb13 100644
--- a/tests/language/unsorted/third_test.dart
+++ b/tests/language/unsorted/third_test.dart
@@ -13,9 +13,7 @@
return s;
}
- A(x, y)
- : a = x,
- super(y) {}
+ A(x, y) : a = x, super(y) {}
value() {
return a + b + foo();
diff --git a/tests/language/unsorted/typed_selector2_test.dart b/tests/language/unsorted/typed_selector2_test.dart
index 463b376..9eb4938 100644
--- a/tests/language/unsorted/typed_selector2_test.dart
+++ b/tests/language/unsorted/typed_selector2_test.dart
@@ -4,7 +4,8 @@
// Test for dart2js to handle a typed selector with a typedef as a
// receiver type.
-getComparator() => (a, b) => 42;
+getComparator() =>
+ (a, b) => 42;
class A {
foo() => 42;
diff --git a/tests/language/unsorted/unevaluated_field_test.dart b/tests/language/unsorted/unevaluated_field_test.dart
index f33fbb5..a79b273 100644
--- a/tests/language/unsorted/unevaluated_field_test.dart
+++ b/tests/language/unsorted/unevaluated_field_test.dart
@@ -6,13 +6,15 @@
import "package:expect/expect.dart";
-const int? gx =
- const bool.hasEnvironment("x") ? const int.fromEnvironment("x") : null;
+const int? gx = const bool.hasEnvironment("x")
+ ? const int.fromEnvironment("x")
+ : null;
class A {
final int? x = gx;
- final int? y =
- const bool.hasEnvironment("y") ? const int.fromEnvironment("y") : null;
+ final int? y = const bool.hasEnvironment("y")
+ ? const int.fromEnvironment("y")
+ : null;
const A();
}