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

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

Issue 1888873004: Add LibraryElementForLink.isDartAsync. (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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/summary/link.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'package:analyzer/src/summary/format.dart'; 5 import 'package:analyzer/src/summary/format.dart';
6 import 'package:analyzer/src/summary/link.dart'; 6 import 'package:analyzer/src/summary/link.dart';
7 import 'package:unittest/unittest.dart'; 7 import 'package:unittest/unittest.dart';
8 8
9 import '../../reflective_tests.dart'; 9 import '../../reflective_tests.dart';
10 import 'summarize_ast_test.dart'; 10 import 'summarize_ast_test.dart';
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 class C<V> extends B<V> { 60 class C<V> extends B<V> {
61 var j; 61 var j;
62 } 62 }
63 '''); 63 ''');
64 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri); 64 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
65 library.libraryCycleForLink.ensureLinked(); 65 library.libraryCycleForLink.ensureLinked();
66 // No assertions--just make sure it doesn't crash. 66 // No assertions--just make sure it doesn't crash.
67 } 67 }
68 68
69 void test_baseClass_genericWithGenericMethod_returnsGenericFuture() {
70 createLinker('''
71 import 'dart:async';
72 class B<T> {
73 Future<T> f() => null;
74 }
75 class C<T> extends B<T> {
76 Future<T> f() => null;
77 }
78 ''');
79 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
80 library.libraryCycleForLink.ensureLinked();
81 // No assertions--just make sure it doesn't crash.
82 }
83
69 void test_baseClass_withPrivateField() { 84 void test_baseClass_withPrivateField() {
70 createLinker(''' 85 createLinker('''
71 class B { 86 class B {
72 var _b; 87 var _b;
73 } 88 }
74 class C extends B { 89 class C extends B {
75 var c; 90 var c;
76 } 91 }
77 '''); 92 ''');
78 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri); 93 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 class C extends B with I {} 466 class C extends B with I {}
452 class D extends C { 467 class D extends C {
453 void f() {} 468 void f() {}
454 } 469 }
455 '''); 470 ''');
456 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri); 471 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
457 library.libraryCycleForLink.ensureLinked(); 472 library.libraryCycleForLink.ensureLinked();
458 // No assertions--just make sure it doesn't crash. 473 // No assertions--just make sure it doesn't crash.
459 } 474 }
460 } 475 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/link.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698