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

Side by Side Diff: tests/compiler/dart2js/mock_compiler.dart

Issue 10942028: Support class and typedef literals as expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix two long lines. Created 8 years, 2 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 next(receiver) {} 52 next(receiver) {}
53 hasNext(receiver) {}'''; 53 hasNext(receiver) {}''';
54 54
55 const String DEFAULT_CORELIB = r''' 55 const String DEFAULT_CORELIB = r'''
56 print(var obj) {} 56 print(var obj) {}
57 abstract class int extends num {} 57 abstract class int extends num {}
58 abstract class double extends num {} 58 abstract class double extends num {}
59 class bool {} 59 class bool {}
60 class String {} 60 class String {}
61 class Object {} 61 class Object {}
62 class Type {}
62 abstract class num {} 63 abstract class num {}
63 class Function {} 64 class Function {}
64 interface List default ListImplementation { List([length]);} 65 interface List default ListImplementation { List([length]);}
65 class ListImplementation { factory List([length]) => null; } 66 class ListImplementation { factory List([length]) => null; }
66 class Closure {} 67 class Closure {}
67 class Null {} 68 class Null {}
68 class Dynamic_ {} 69 class Dynamic_ {}
69 bool identical(Object a, Object b) {}'''; 70 bool identical(Object a, Object b) {}''';
70 71
71 class MockCompiler extends Compiler { 72 class MockCompiler extends Compiler {
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 }); 216 });
216 } 217 }
217 } 218 }
218 219
219 LibraryElement mockLibrary(Compiler compiler, String source) { 220 LibraryElement mockLibrary(Compiler compiler, String source) {
220 Uri uri = new Uri.fromComponents(scheme: "source"); 221 Uri uri = new Uri.fromComponents(scheme: "source");
221 var library = new LibraryElement(new Script(uri, new MockFile(source))); 222 var library = new LibraryElement(new Script(uri, new MockFile(source)));
222 importLibrary(library, compiler.coreLibrary, compiler); 223 importLibrary(library, compiler.coreLibrary, compiler);
223 return library; 224 return library;
224 } 225 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698