Skip to content

Commit 1d684cd

Browse files
munificentCommit Queue
authored andcommitted
Reformat tests/language/abstract.
Change-Id: I18bbc65a798e79fb5e69a9a4134c10a9f6cdbb3f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/399860 Auto-Submit: Bob Nystrom <[email protected]> Reviewed-by: Lasse Nielsen <[email protected]> Commit-Queue: Lasse Nielsen <[email protected]>
1 parent e4f7f4f commit 1d684cd

9 files changed

+22
-59
lines changed

tests/language/abstract/factory_constructor_runtime_test.dart

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// TODO(multitest): This was automatically migrated from a multitest and may
2-
// contain strange or dead code.
3-
41
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
52
// for details. All rights reserved. Use of this source code is governed by a
63
// BSD-style license that can be found in the LICENSE file.
@@ -22,13 +19,6 @@ abstract class A1 {
2219
}
2320
}
2421

25-
class A2 {
26-
// Intentionally abstract method.
27-
28-
A2.make() {}
29-
}
30-
3122
main() {
3223
new A1.make();
33-
3424
}

tests/language/abstract/factory_constructor_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ abstract class A1 {
2020
}
2121

2222
class A2 {
23-
// ^
24-
// [cfe] The non-abstract class 'A2' is missing implementations for these members:
23+
// ^
24+
// [cfe] The non-abstract class 'A2' is missing implementations for these members:
2525

2626
// Intentionally abstract method.
2727
method();
28-
//^^^^^^^^^
29-
// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
28+
// [error column 3, length 9]
29+
// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
3030
A2.make() {}
3131
}
3232

tests/language/abstract/getter2_test.dart

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,17 @@ void main() {
5252
/// Tests that overriding either the getter or setter with an abstract member
5353
/// has no effect.
5454
/// Regression test for https://github.com/dart-lang/sdk/issues/29914
55-
var c1 = AbstractGetterOverride1()
56-
..foo = 123
57-
..bar = 456;
55+
var c1 =
56+
AbstractGetterOverride1()
57+
..foo = 123
58+
..bar = 456;
5859
Expect.equals(c1.foo, 123);
5960
Expect.equals(c1.bar, 456);
6061

61-
var c2 = AbstractGetterOverride2()
62-
..foo = 123
63-
..bar = 456;
62+
var c2 =
63+
AbstractGetterOverride2()
64+
..foo = 123
65+
..bar = 456;
6466
Expect.equals(c2.foo, 123);
6567
Expect.equals(c2.bar, 456);
6668
}

tests/language/abstract/getter_test.dart renamed to tests/language/abstract/getter_error_test.dart

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,15 @@ import "package:expect/expect.dart";
77
// Test to ensure that an abstract getter is not mistaken for a field.
88

99
class Foo {
10-
// ^
11-
// [cfe] The non-abstract class 'Foo' is missing implementations for these members:
10+
// ^
11+
// [cfe] The non-abstract class 'Foo' is missing implementations for these members:
1212

1313
// Intentionally abstract:
1414
get i;
15-
//^^^^^^
16-
// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
15+
// [error column 3, length 6]
16+
// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
1717
}
1818

19-
class Bar {}
20-
2119
checkIt(f) {
2220
Expect.throwsNoSuchMethodError(() => f.i = 'hi');
2321
Expect.throwsNoSuchMethodError(() => print(f.i));
@@ -26,5 +24,4 @@ checkIt(f) {
2624

2725
main() {
2826
checkIt(new Foo());
29-
checkIt(new Bar());
3027
}

tests/language/abstract/override_adds_optional_args_concrete_test.dart renamed to tests/language/abstract/override_adds_optional_args_concrete_error_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ class A {
77
}
88

99
class B extends A {
10-
// ^
11-
// [analyzer] COMPILE_TIME_ERROR.INVALID_IMPLEMENTATION_OVERRIDE
12-
// [cfe] The implementation of 'foo' in the non-abstract class 'B' does not conform to its interface.
10+
// ^
11+
// [analyzer] COMPILE_TIME_ERROR.INVALID_IMPLEMENTATION_OVERRIDE
12+
// [cfe] The implementation of 'foo' in the non-abstract class 'B' does not conform to its interface.
1313

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

tests/language/abstract/override_adds_optional_args_concrete_subclass_test.dart renamed to tests/language/abstract/override_adds_optional_args_concrete_subclass_error_test.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,9 @@ abstract class B extends A {
1515
}
1616

1717
class C extends B {
18-
// ^
19-
// [analyzer] COMPILE_TIME_ERROR.INVALID_IMPLEMENTATION_OVERRIDE
20-
// [cfe] The implementation of 'foo' in the non-abstract class 'C' does not conform to its interface.
21-
22-
// However, there is a problem here because this class is concrete and doesn't
23-
// override foo.
18+
// ^
19+
// [analyzer] COMPILE_TIME_ERROR.INVALID_IMPLEMENTATION_OVERRIDE
20+
// [cfe] The implementation of 'foo' in the non-abstract class 'C' does not conform to its interface.
2421
}
2522

2623
void f(B b) {

tests/language/abstract/syntax_runtime_test.dart

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)