Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: pkg/analysis_server/test/services/correction/fix_test.dart

Issue 1650853002: Issue 25622. Quick fix for 'async-for'. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/fix_internal.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/correction/fix_test.dart
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
index 7ce9b90363356bbac3d4d16e0a5b4d05fdb2e6a0..24d3f1894809ebb2fe432d724c5096cbb4e953c3 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -349,6 +349,27 @@ class A {}
''');
}
+ test_addSync_asyncFor() async {
+ resolveTestUnit('''
+import 'dart:async';
+main(Stream<String> names) {
+ await for (String name in names) {
+ print(name);
+ }
+}
+''');
+ await assertHasFix(
+ DartFixKind.ADD_ASYNC,
+ '''
+import 'dart:async';
+main(Stream<String> names) async {
+ await for (String name in names) {
+ print(name);
+ }
+}
+''');
+ }
+
test_addSync_BAD_nullFunctionBody() async {
resolveTestUnit('''
var F = await;
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/fix_internal.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698