Skip to content

Commit

Permalink
prefer_final_parameters tests (#4182)
Browse files Browse the repository at this point in the history
* prefer_final_parameters tests

* --
  • Loading branch information
pq authored Mar 21, 2023
1 parent 8bfe18a commit 0a9c084
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions test/rules/prefer_final_parameters_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,22 @@ class PreferFinalParametersTestLanguage300 extends LintRuleTest
String get lintRule => 'prefer_final_parameters';

@FailingTest(issue: 'https://github.com/dart-lang/linter/issues/4156')
test_recordPattern_destructured() async {
test_listPattern_destructured() async {
await assertNoDiagnostics('''
void f(int p) {
var list = [1, 2, 3];
var [_, p, _] = list;
[_, p, _] = [1, 2, 3];
print(p);
}
''');
}

@FailingTest(issue: 'https://github.com/dart-lang/linter/issues/4156')
test_recordPattern_destructured() async {
await assertNoDiagnostics(r'''
void f(int a, int b) {
(a, b) = (1, 2);
print('$a$b');
}
''');
}
}

0 comments on commit 0a9c084

Please sign in to comment.