Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Commit d8cbbd7

Browse files
authored
update test (#4084)
* update test * fixed codes * update patttern-for test
1 parent 2f2e3f1 commit d8cbbd7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/rules/non_constant_identifier_names_test.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,25 @@ class NonConstantIdentifierNamesPatternsTest extends LintRuleTest {
2222
@override
2323
String get lintRule => 'non_constant_identifier_names';
2424

25-
@FailingTest(reason: 'Flow analysis fails w/ a Bad state exception')
2625
test_patternForStatement() async {
2726
await assertDiagnostics(r'''
2827
void f() {
29-
for (var (AB, ) = (0, 1); AB <= 13; (AB, ) = ( , AB++)) { }
28+
for (var (AB, c) = (0, 1); AB <= 13; (AB, c) = (c, AB + c)) { }
3029
}
3130
''', [
32-
lint(18, 2),
31+
lint(23, 2),
3332
]);
3433
}
3534

3635
test_patternIfStatement() async {
3736
await assertDiagnostics(r'''
3837
void f() {
39-
if ([1,2] case [int AB, int]) { }
38+
if ([1,2] case [int AB, int c]) { }
4039
}
4140
''', [
4241
error(WarningCode.UNUSED_LOCAL_VARIABLE, 33, 2),
4342
lint(33, 2),
43+
error(WarningCode.UNUSED_LOCAL_VARIABLE, 41, 1),
4444
]);
4545
}
4646

0 commit comments

Comments
 (0)