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

Side by Side Diff: frog/tests/leg/src/mock_compiler.dart

Issue 9616058: Implement parsing and resolving of type-variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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('mock_compiler'); 5 #library('mock_compiler');
6 6
7 #import("../../../../lib/uri/uri.dart"); 7 #import("../../../../lib/uri/uri.dart");
8 8
9 #import("../../../leg/elements/elements.dart"); 9 #import("../../../leg/elements/elements.dart");
10 #import("../../../leg/io/io.dart", prefix: 'io'); 10 #import("../../../leg/io/io.dart", prefix: 'io');
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 } 129 }
130 130
131 resolve(ClassElement element) { 131 resolve(ClassElement element) {
132 return resolver.resolveType(element); 132 return resolver.resolveType(element);
133 } 133 }
134 134
135 void scanBuiltinLibraries() { 135 void scanBuiltinLibraries() {
136 // Do nothing. The mock core library is already handled in the constructor. 136 // Do nothing. The mock core library is already handled in the constructor.
137 } 137 }
138 138
139 LibraryElement scanBuiltinLibrary(String name) {
140 // Do nothing. The mock core library is already handled in the constructor.
141 }
142
139 Script readScript(Uri uri, [ScriptTag node]) { 143 Script readScript(Uri uri, [ScriptTag node]) {
140 String code = sources[uri.toString()]; 144 String code = sources[uri.toString()];
141 if (code === null) throw new IllegalArgumentException(uri); 145 if (code === null) throw new IllegalArgumentException(uri);
142 return new StringScript(code); 146 return new StringScript(code);
143 } 147 }
144 } 148 }
145 149
146 void compareWarningKinds(String text, expectedWarnings, foundWarnings) { 150 void compareWarningKinds(String text, expectedWarnings, foundWarnings) {
147 var fail = (message) => Expect.fail('$text: $message'); 151 var fail = (message) => Expect.fail('$text: $message');
148 Iterator<MessageKind> expected = expectedWarnings.iterator(); 152 Iterator<MessageKind> expected = expectedWarnings.iterator();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 importLibrary(library, compiler.coreLibrary, compiler); 184 importLibrary(library, compiler.coreLibrary, compiler);
181 return library; 185 return library;
182 } 186 }
183 187
184 class StringScript extends Script { 188 class StringScript extends Script {
185 final String code; 189 final String code;
186 StringScript(this.code) : super(null, null); 190 StringScript(this.code) : super(null, null);
187 String get text() => code; 191 String get text() => code;
188 String get name() => "mock script"; 192 String get name() => "mock script";
189 } 193 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698