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

Side by Side Diff: test/codegen/recorder_test.dart

Issue 2336903002: Stop using LibraryElement.visibleLibraries getter. (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 @TestOn('vm') 5 @TestOn('vm')
6 library smoke.test.codegen.recorder_test; 6 library smoke.test.codegen.recorder_test;
7 7
8 import 'package:analyzer/dart/element/element.dart'; 8 import 'package:analyzer/dart/element/element.dart';
9 import 'package:smoke/codegen/generator.dart'; 9 import 'package:smoke/codegen/generator.dart';
10 import 'package:smoke/codegen/recorder.dart'; 10 import 'package:smoke/codegen/recorder.dart';
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 recorder.lookupParent(lib.getType('A')); 82 recorder.lookupParent(lib.getType('A'));
83 recorder.lookupParent(lib.getType('B')); 83 recorder.lookupParent(lib.getType('B'));
84 recorder.lookupParent(lib.getType('C')); 84 recorder.lookupParent(lib.getType('C'));
85 recorder.lookupParent(lib.getType('D')); 85 recorder.lookupParent(lib.getType('D'));
86 recorder.lookupParent(lib.getType('E')); 86 recorder.lookupParent(lib.getType('E'));
87 recorder.lookupParent(lib.getType('E2')); 87 recorder.lookupParent(lib.getType('E2'));
88 recorder.lookupParent(lib.getType('F')); 88 recorder.lookupParent(lib.getType('F'));
89 recorder.lookupParent(lib.getType('F2')); 89 recorder.lookupParent(lib.getType('F2'));
90 recorder.lookupParent(lib.getType('G')); 90 recorder.lookupParent(lib.getType('G'));
91 recorder.lookupParent(lib.getType('H')); 91 recorder.lookupParent(lib.getType('H'));
92 var coreLib = 92 var coreLib = lib.context.typeProvider.objectType.element.library;
93 lib.visibleLibraries.firstWhere((l) => l.displayName == 'dart.core');
94 recorder.lookupParent(coreLib.getType('int')); 93 recorder.lookupParent(coreLib.getType('int'));
95 recorder.lookupParent(coreLib.getType('num')); 94 recorder.lookupParent(coreLib.getType('num'));
96 95
97 checkResults(generator, 96 checkResults(generator,
98 imports: ["import '/common.dart' as smoke_0;",], 97 imports: ["import '/common.dart' as smoke_0;",],
99 topLevel: 'abstract class _M0 {} // C & A\n', 98 topLevel: 'abstract class _M0 {} // C & A\n',
100 initCall: 'useGeneratedCode(new StaticConfiguration(\n' 99 initCall: 'useGeneratedCode(new StaticConfiguration(\n'
101 ' checkedMode: false,\n' 100 ' checkedMode: false,\n'
102 ' parents: {\n' 101 ' parents: {\n'
103 ' smoke_0.AnnotB: smoke_0.Annot,\n' 102 ' smoke_0.AnnotB: smoke_0.Annot,\n'
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 771
773 class K { 772 class K {
774 @AnnotC(named: true) int k; 773 @AnnotC(named: true) int k;
775 @AnnotC() int k2; 774 @AnnotC() int k2;
776 } 775 }
777 ''' 776 '''
778 }; 777 };
779 778
780 String resolveImportUrl(LibraryElement lib) => 779 String resolveImportUrl(LibraryElement lib) =>
781 lib.isDartCore ? 'dart:core' : '/${lib.displayName}.dart'; 780 lib.isDartCore ? 'dart:core' : '/${lib.displayName}.dart';
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698