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

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

Issue 10113007: We must use the original element and not the default implementation element when checking if the co… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | 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("dart:uri"); 7 #import("dart:uri");
8 8
9 #import("../../../../lib/compiler/implementation/elements/elements.dart"); 9 #import("../../../../lib/compiler/implementation/elements/elements.dart");
10 #import("../../../../lib/compiler/implementation/leg.dart"); 10 #import("../../../../lib/compiler/implementation/leg.dart");
(...skipping 30 matching lines...) Expand all
41 41
42 final String DEFAULT_CORELIB = @''' 42 final String DEFAULT_CORELIB = @'''
43 print(var obj) {} 43 print(var obj) {}
44 class int {} 44 class int {}
45 class double {} 45 class double {}
46 class bool {} 46 class bool {}
47 class String {} 47 class String {}
48 class Object {} 48 class Object {}
49 class num {} 49 class num {}
50 class Function {} 50 class Function {}
51 class List {} 51 class List { factory List() => null; }
52 class Closure {} 52 class Closure {}
53 class Null {} 53 class Null {}
54 class Dynamic {}'''; 54 class Dynamic {}''';
55 55
56 class MockCompiler extends Compiler { 56 class MockCompiler extends Compiler {
57 List<WarningMessage> warnings; 57 List<WarningMessage> warnings;
58 List<WarningMessage> errors; 58 List<WarningMessage> errors;
59 final Map<String, String> sources; 59 final Map<String, String> sources;
60 Node parsedTree; 60 Node parsedTree;
61 61
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 importLibrary(library, compiler.coreLibrary, compiler); 188 importLibrary(library, compiler.coreLibrary, compiler);
189 return library; 189 return library;
190 } 190 }
191 191
192 class StringScript extends Script { 192 class StringScript extends Script {
193 final String code; 193 final String code;
194 StringScript(this.code) : super(null, null); 194 StringScript(this.code) : super(null, null);
195 String get text() => code; 195 String get text() => code;
196 String get name() => "mock script"; 196 String get name() => "mock script";
197 } 197 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698