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

Side by Side 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, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.src.serialization.elements_test; 5 library test.src.serialization.elements_test;
6 6
7 import 'dart:convert'; 7 import 'dart:convert';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/constant/value.dart'; 10 import 'package:analyzer/dart/constant/value.dart';
(...skipping 2898 matching lines...) Expand 10 before | Expand all | Expand 10 after
2909 } 2909 }
2910 2910
2911 test_field_static_final_untyped() { 2911 test_field_static_final_untyped() {
2912 checkLibrary('class C { static final x = 0; }'); 2912 checkLibrary('class C { static final x = 0; }');
2913 } 2913 }
2914 2914
2915 test_field_untyped() { 2915 test_field_untyped() {
2916 checkLibrary('class C { var x = 0; }'); 2916 checkLibrary('class C { var x = 0; }');
2917 } 2917 }
2918 2918
2919 test_function_async() {
2920 checkLibrary(r'''
2921 import 'dart:async';
2922 Future f() async {}
2923 ''');
2924 }
2925
2926 test_function_asyncStar() {
2927 checkLibrary(r'''
2928 import 'dart:async';
2929 Stream f() async* {}
2930 ''');
2931 }
2932
2919 test_function_documented() { 2933 test_function_documented() {
2920 checkLibrary(''' 2934 checkLibrary('''
2921 // Extra comment so doc comment offset != 0 2935 // Extra comment so doc comment offset != 0
2922 /** 2936 /**
2923 * Docs 2937 * Docs
2924 */ 2938 */
2925 f() {}'''); 2939 f() {}''');
2926 } 2940 }
2927 2941
2928 test_function_entry_point() { 2942 test_function_entry_point() {
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
3521 3535
3522 test_main_variable() { 3536 test_main_variable() {
3523 checkLibrary('var main;'); 3537 checkLibrary('var main;');
3524 } 3538 }
3525 3539
3526 test_main_variable_via_export() { 3540 test_main_variable_via_export() {
3527 addLibrarySource('/a.dart', 'var main;'); 3541 addLibrarySource('/a.dart', 'var main;');
3528 checkLibrary('export "a.dart";'); 3542 checkLibrary('export "a.dart";');
3529 } 3543 }
3530 3544
3545 test_member_function_async() {
3546 checkLibrary(r'''
3547 import 'dart:async';
3548 class C {
3549 Future f() async {}
3550 }
3551 ''');
3552 }
3553
3554 test_member_function_asyncStar() {
3555 checkLibrary(r'''
3556 import 'dart:async';
3557 class C {
3558 Stream f() async* {}
3559 }
3560 ''');
3561 }
3562
3531 test_metadata_classDeclaration() { 3563 test_metadata_classDeclaration() {
3532 checkLibrary('const a = null; @a class C {}'); 3564 checkLibrary('const a = null; @a class C {}');
3533 } 3565 }
3534 3566
3535 test_metadata_classTypeAlias() { 3567 test_metadata_classTypeAlias() {
3536 checkLibrary( 3568 checkLibrary(
3537 'const a = null; @a class C = D with E; class D {} class E {}'); 3569 'const a = null; @a class C = D with E; class D {} class E {}');
3538 } 3570 }
3539 3571
3540 test_metadata_constructor_call_named() { 3572 test_metadata_constructor_call_named() {
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
4319 fail('Unexpectedly tried to get unlinked summary for $uri'); 4351 fail('Unexpectedly tried to get unlinked summary for $uri');
4320 } 4352 }
4321 return serializedUnit; 4353 return serializedUnit;
4322 } 4354 }
4323 4355
4324 @override 4356 @override
4325 bool hasLibrarySummary(String uri) { 4357 bool hasLibrarySummary(String uri) {
4326 return true; 4358 return true;
4327 } 4359 }
4328 } 4360 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698