Skip to content

Commit 1ba6da2

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

File tree

58 files changed

+438
-823
lines changed

Some content is hidden

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

58 files changed

+438
-823
lines changed

tests/language/this/conditional_operator_runtime_test.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ class B {
1818

1919
test() {
2020
this?.field = 1;
21-
// ^^
22-
// [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
21+
// ^^
22+
// [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
2323
this?.field += 1;
24-
// ^^
25-
// [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
24+
// ^^
25+
// [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
2626
this?.field;
27-
// ^^
28-
// [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
27+
// ^^
28+
// [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
2929
this?.method();
30-
// ^^
31-
// [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
30+
// ^^
31+
// [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
3232
}
3333
}
3434

tests/language/this/implicit_runtime_test.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ abstract class Abstract implements Interface {
1919
// This class does not implement "x" either, but it is not marked
2020
// abstract.
2121

22-
2322
// This class does not implement "x", but is itself abstract, so that's OK.
2423
abstract class SubAbstract2 extends Abstract {
2524
get x; // Abstract.
@@ -28,7 +27,6 @@ abstract class SubAbstract2 extends Abstract {
2827
// This class does not implement "x" either, but it is not marked
2928
// abstract.
3029

31-
3230
class Concrete extends Abstract {
3331
get x => 7;
3432
}
@@ -39,7 +37,6 @@ class SubConcrete extends Concrete {
3937
}
4038

4139
void main() {
42-
4340
Expect.equals('7', new Concrete().toString());
4441
Expect.equals('42', new SubConcrete(42).toString());
4542
Expect.equals('7', new SubConcrete(new Concrete()).toString());

tests/language/this/runtime_test.dart

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,7 @@ class Foo {
99
var x;
1010
f() {}
1111

12-
testMe() {
13-
14-
15-
16-
17-
18-
19-
20-
21-
}
12+
testMe() {}
2213
}
2314

2415
main() {

tests/language/top_level/func_test.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ int Sum(List<int> v) {
4242
}
4343

4444
get Window {
45-
return "win" "dow";
45+
return "win"
46+
"dow";
4647
}
4748

4849
String? rgb;

tests/language/top_level/getter_no_setter1_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ int get getter {
1414
class Class {
1515
method() {
1616
getter++;
17-
// ^^^^^^
18-
// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL
19-
// [cfe] Setter not found: 'getter'.
17+
// [error column 5, length 6]
18+
// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL
19+
// [cfe] Setter not found: 'getter'.
2020
}
2121
}
2222

tests/language/top_level/getter_no_setter2_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ final int getter = () {
1414
class Class {
1515
method() {
1616
getter++;
17-
// ^^^^^^
18-
// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL
19-
// [cfe] Setter not found: 'getter'.
17+
// [error column 5, length 6]
18+
// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL
19+
// [cfe] Setter not found: 'getter'.
2020
}
2121
}
2222

tests/language/type/checks_in_factory_method_runtime_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ class Bar<T> implements Foo<T> {
2323
print(" String=$isString");
2424
};
2525

26-
2726
return new Bar<T>();
2827
}
2928
}

tests/language/type/conversion_ssa_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ var array = <dynamic>[
2323
new SelectorGroup([
2424
new Selector([new SimpleSelectorSequence(new ClassSelector())]),
2525
new Selector([new SimpleSelectorSequence(new ClassSelector())]),
26-
new Selector([new SimpleSelectorSequence(new ClassSelector())])
26+
new Selector([new SimpleSelectorSequence(new ClassSelector())]),
2727
]),
28-
new Object()
28+
new Object(),
2929
];
3030

3131
class RuleSet {

tests/language/type/error_test.dart

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,25 @@ void main() {
2727

2828
dynamic noToString = NoToString();
2929

30-
Expect.throws<TypeError>(() {
31-
wrap(noToString) as int; // Explicit cast should throw
32-
}, (e) {
33-
e.toString(); // Should not throw.
34-
return true;
35-
});
36-
37-
if (assertionsEnabled) {
38-
Expect.throws<AssertionError>(() {
39-
assert(wrap(false), noToString); // Assertion should throw
40-
}, (e) {
30+
Expect.throws<TypeError>(
31+
() {
32+
wrap(noToString) as int; // Explicit cast should throw
33+
},
34+
(e) {
4135
e.toString(); // Should not throw.
4236
return true;
43-
});
37+
},
38+
);
39+
40+
if (assertionsEnabled) {
41+
Expect.throws<AssertionError>(
42+
() {
43+
assert(wrap(false), noToString); // Assertion should throw
44+
},
45+
(e) {
46+
e.toString(); // Should not throw.
47+
return true;
48+
},
49+
);
4450
}
4551
}

tests/language/type/implicit_error_test.dart

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,25 @@ void main() {
2727

2828
dynamic noToString = NoToString();
2929

30-
Expect.throws<TypeError>(() {
31-
int x = wrap(noToString); // Implicit cast should throw
32-
}, (e) {
33-
e.toString(); // Should not throw.
34-
return true;
35-
});
36-
37-
if (assertionsEnabled) {
38-
Expect.throws<TypeError>(() {
39-
assert(wrap(noToString)); // Implicit cast should throw
40-
}, (e) {
30+
Expect.throws<TypeError>(
31+
() {
32+
int x = wrap(noToString); // Implicit cast should throw
33+
},
34+
(e) {
4135
e.toString(); // Should not throw.
4236
return true;
43-
});
37+
},
38+
);
39+
40+
if (assertionsEnabled) {
41+
Expect.throws<TypeError>(
42+
() {
43+
assert(wrap(noToString)); // Implicit cast should throw
44+
},
45+
(e) {
46+
e.toString(); // Should not throw.
47+
return true;
48+
},
49+
);
4450
}
4551
}

0 commit comments

Comments
 (0)