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

Side by Side Diff: pkg/analyzer/test/src/summary/resynthesize_common.dart

Issue 2992083002: Resynthesize typedefs from Kernel. (Closed)
Patch Set: Created 3 years, 4 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:async'; 7 import 'dart:async';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; 10 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
(...skipping 9422 matching lines...) Expand 10 before | Expand all | Expand 10 after
9433 '''); 9433 ''');
9434 } 9434 }
9435 9435
9436 test_typedef_parameters() async { 9436 test_typedef_parameters() async {
9437 var library = await checkLibrary('typedef F(x, y);'); 9437 var library = await checkLibrary('typedef F(x, y);');
9438 checkElementText(library, r''' 9438 checkElementText(library, r'''
9439 typedef dynamic F(dynamic x, dynamic y); 9439 typedef dynamic F(dynamic x, dynamic y);
9440 '''); 9440 ''');
9441 } 9441 }
9442 9442
9443 test_typedef_parameters_named() async {
9444 var library = await checkLibrary('typedef F({y, z, x});');
9445 checkElementText(library, r'''
9446 typedef dynamic F({dynamic y}, {dynamic z}, {dynamic x});
9447 ''');
9448 }
9449
9443 test_typedef_return_type() async { 9450 test_typedef_return_type() async {
9444 var library = await checkLibrary('typedef int F();'); 9451 var library = await checkLibrary('typedef int F();');
9445 checkElementText(library, r''' 9452 checkElementText(library, r'''
9446 typedef int F(); 9453 typedef int F();
9447 '''); 9454 ''');
9448 } 9455 }
9449 9456
9450 test_typedef_return_type_generic() async { 9457 test_typedef_return_type_generic() async {
9451 var library = await checkLibrary('typedef T F<T>();'); 9458 var library = await checkLibrary('typedef T F<T>();');
9452 checkElementText(library, r''' 9459 checkElementText(library, r'''
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
10062 fail('Unexpectedly tried to get unlinked summary for $uri'); 10069 fail('Unexpectedly tried to get unlinked summary for $uri');
10063 } 10070 }
10064 return serializedUnit; 10071 return serializedUnit;
10065 } 10072 }
10066 10073
10067 @override 10074 @override
10068 bool hasLibrarySummary(String uri) { 10075 bool hasLibrarySummary(String uri) {
10069 return true; 10076 return true;
10070 } 10077 }
10071 } 10078 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/kernel/resynthesize.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698