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

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

Issue 1893613002: Implement TypeParameterElementForLink.location. (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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 class C<U> extends B<U> { 46 class C<U> extends B<U> {
47 var j; 47 var j;
48 } 48 }
49 '''); 49 ''');
50 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri); 50 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
51 library.libraryCycleForLink.ensureLinked(); 51 library.libraryCycleForLink.ensureLinked();
52 // No assertions--just make sure it doesn't crash. 52 // No assertions--just make sure it doesn't crash.
53 } 53 }
54 54
55 void test_baseClass_genericWithGenericMethod() {
56 createLinker('''
57 class B<T> {
58 List<U> f<U>(U u) => null;
59 }
60 class C<V> extends B<V> {
61 var j;
62 }
63 ''');
64 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
65 library.libraryCycleForLink.ensureLinked();
66 // No assertions--just make sure it doesn't crash.
67 }
68
55 void test_baseClass_withPrivateField() { 69 void test_baseClass_withPrivateField() {
56 createLinker(''' 70 createLinker('''
57 class B { 71 class B {
58 var _b; 72 var _b;
59 } 73 }
60 class C extends B { 74 class C extends B {
61 var c; 75 var c;
62 } 76 }
63 '''); 77 ''');
64 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri); 78 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 addNamedSource('/b.dart', ''); 433 addNamedSource('/b.dart', '');
420 createLinker('import "a.dart"; import "b.dart";'); 434 createLinker('import "a.dart"; import "b.dart";');
421 LibraryElementForLink libA = getLibrary('file:///a.dart'); 435 LibraryElementForLink libA = getLibrary('file:///a.dart');
422 LibraryElementForLink libB = getLibrary('file:///b.dart'); 436 LibraryElementForLink libB = getLibrary('file:///b.dart');
423 LibraryCycleForLink libraryCycle = testLibrary.libraryCycleForLink; 437 LibraryCycleForLink libraryCycle = testLibrary.libraryCycleForLink;
424 expect(libraryCycle.dependencies, 438 expect(libraryCycle.dependencies,
425 unorderedEquals([libA.libraryCycleForLink, libB.libraryCycleForLink])); 439 unorderedEquals([libA.libraryCycleForLink, libB.libraryCycleForLink]));
426 expect(libraryCycle.libraries, [testLibrary]); 440 expect(libraryCycle.libraries, [testLibrary]);
427 } 441 }
428 } 442 }
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