Skip to content

Commit a0009a2

Browse files
test: remove unnecessary test file
test: add nested 3 ifs test case
1 parent 7304ea6 commit a0009a2

2 files changed

Lines changed: 16 additions & 425 deletions

File tree

test/lints/prefer_early_return/prefer_early_return_rule_test.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,22 @@ void test(bool a, bool b) {
197197
);
198198
}
199199

200+
void test_reports_on_three_if() async {
201+
await assertDiagnostics(
202+
r'''
203+
void threeIf(bool a, bool b, bool c) {
204+
if (a) {
205+
if (b) {
206+
if (c) {
207+
print('hello');
208+
}
209+
}
210+
}
211+
}''',
212+
[lint(41, 74)],
213+
);
214+
}
215+
200216
void test_does_not_report_nested_3_with_else_1() async {
201217
await assertNoDiagnostics(
202218
r'''

0 commit comments

Comments
 (0)