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

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

Issue 1892913002: Add LibraryElementForLink.context getter. (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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 addNamedSource('/a.dart', ''); 432 addNamedSource('/a.dart', '');
433 addNamedSource('/b.dart', ''); 433 addNamedSource('/b.dart', '');
434 createLinker('import "a.dart"; import "b.dart";'); 434 createLinker('import "a.dart"; import "b.dart";');
435 LibraryElementForLink libA = getLibrary('file:///a.dart'); 435 LibraryElementForLink libA = getLibrary('file:///a.dart');
436 LibraryElementForLink libB = getLibrary('file:///b.dart'); 436 LibraryElementForLink libB = getLibrary('file:///b.dart');
437 LibraryCycleForLink libraryCycle = testLibrary.libraryCycleForLink; 437 LibraryCycleForLink libraryCycle = testLibrary.libraryCycleForLink;
438 expect(libraryCycle.dependencies, 438 expect(libraryCycle.dependencies,
439 unorderedEquals([libA.libraryCycleForLink, libB.libraryCycleForLink])); 439 unorderedEquals([libA.libraryCycleForLink, libB.libraryCycleForLink]));
440 expect(libraryCycle.libraries, [testLibrary]); 440 expect(libraryCycle.libraries, [testLibrary]);
441 } 441 }
442
443 void test_multiplyInheritedExecutable_differentSignatures() {
444 createLinker('''
445 class B {
446 void f() {}
442 } 447 }
448 abstract class I {
449 f();
450 }
451 class C extends B with I {}
452 class D extends C {
453 void f() {}
454 }
455 ''');
456 LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
457 library.libraryCycleForLink.ensureLinked();
458 // No assertions--just make sure it doesn't crash.
459 }
460 }
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