Replace 'throw fail()' with just 'fail()'.

I saw these new warnings after SDK update.

R=brianwilkerson@google.com

Change-Id: I0c8113404758918ee2edf3c3392d135f466a6da1
Reviewed-on: https://dart-review.googlesource.com/40420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
Konstantin Shcheglov 2018-02-09 18:54:49 +00:00 committed by commit-bot@chromium.org
parent 36b957762e
commit 0ee998b675
2 changed files with 4 additions and 4 deletions

View file

@ -71,7 +71,7 @@ class AssistProcessorTest extends AbstractSingleUnitTest {
List<Assist> assists = await _computeAssists();
for (Assist assist in assists) {
if (assist.kind == kind) {
throw fail('Unexpected assist $kind in\n${assists.join('\n')}');
fail('Unexpected assist $kind in\n${assists.join('\n')}');
}
}
}
@ -4941,7 +4941,7 @@ main() {
return assist;
}
}
throw fail('Expected to find assist $kind in\n${assists.join('\n')}');
fail('Expected to find assist $kind in\n${assists.join('\n')}');
}
void _assertLinkedGroup(LinkedEditGroup group, List<String> expectedStrings,

View file

@ -100,7 +100,7 @@ bool test() {
List<Fix> fixes = await _computeFixes(error);
for (Fix fix in fixes) {
if (fix.kind == kind) {
throw fail('Unexpected fix $kind in\n${fixes.join('\n')}');
fail('Unexpected fix $kind in\n${fixes.join('\n')}');
}
}
}
@ -140,7 +140,7 @@ bool test() {
return fix;
}
}
throw fail('Expected to find fix $kind in\n${fixes.join('\n')}');
fail('Expected to find fix $kind in\n${fixes.join('\n')}');
}
void _assertLinkedGroup(LinkedEditGroup group, List<String> expectedStrings,