Skip to content

Commit da2ffed

Browse files
jakemac53Commit Queue
authored andcommitted
add test for adding super calls with multiple parameters
Bug:#59745 Change-Id: Ibaf6321f0ea6cf3046f360e91cf58faba7a16cb3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408460 Reviewed-by: Samuel Rawlins <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]> Auto-Submit: Jake Macdonald <[email protected]>
1 parent 9a47862 commit da2ffed

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

pkg/analysis_server/test/src/services/correction/fix/add_call_super_test.dart

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,35 @@ class B extends A {
8383
''', matchFixMessage: "Add 'super.m(x)'");
8484
}
8585

86+
Future<void> test_body_multiple_parameters() async {
87+
await resolveTestCode('''
88+
import 'package:meta/meta.dart';
89+
90+
class A {
91+
@mustCallSuper
92+
void m(int x, bool y) {}
93+
}
94+
class B extends A {
95+
@override
96+
void m(int x, bool y) {}
97+
}
98+
''');
99+
await assertHasFix('''
100+
import 'package:meta/meta.dart';
101+
102+
class A {
103+
@mustCallSuper
104+
void m(int x, bool y) {}
105+
}
106+
class B extends A {
107+
@override
108+
void m(int x, bool y) {
109+
super.m(x, y);
110+
}
111+
}
112+
''', matchFixMessage: "Add 'super.m(x, y)'");
113+
}
114+
86115
Future<void> test_body_optional() async {
87116
await resolveTestCode('''
88117
import 'package:meta/meta.dart';

0 commit comments

Comments
 (0)