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

Unified Diff: pkg/analyzer/test/src/summary/resynthesize_test.dart

Issue 1936403002: Serialize / resynthesize 'isAsynchronous' and 'isGenerator' flags. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
Index: pkg/analyzer/test/src/summary/resynthesize_test.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_test.dart b/pkg/analyzer/test/src/summary/resynthesize_test.dart
index faef708ca335b23ad86562de808a1220f828f45e..23dbd71c188ac4b4bd251b2082cb4351b6b5ecb5 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart
@@ -2916,6 +2916,20 @@ class C {
checkLibrary('class C { var x = 0; }');
}
+ test_function_async() {
+ checkLibrary(r'''
+import 'dart:async';
+Future f() async {}
+''');
+ }
+
+ test_function_asyncStar() {
+ checkLibrary(r'''
+import 'dart:async';
+Stream f() async* {}
+''');
+ }
+
test_function_documented() {
checkLibrary('''
// Extra comment so doc comment offset != 0
@@ -3528,6 +3542,24 @@ get g {
checkLibrary('export "a.dart";');
}
+ test_member_function_async() {
+ checkLibrary(r'''
+import 'dart:async';
+class C {
+ Future f() async {}
+}
+''');
+ }
+
+ test_member_function_asyncStar() {
+ checkLibrary(r'''
+import 'dart:async';
+class C {
+ Stream f() async* {}
+}
+''');
+ }
+
test_metadata_classDeclaration() {
checkLibrary('const a = null; @a class C {}');
}

Powered by Google App Engine
This is Rietveld 408576698