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

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

Issue 11093078: - Add support for binary operators (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Forgot one comment. Created 8 years, 1 month 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
« no previous file with comments | « tests/compiler/dart2js/cpa_inference_test.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) 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/compiler.dart' as api; 9 import '../../../lib/compiler/compiler.dart' as api;
10 import '../../../lib/compiler/implementation/dart2jslib.dart' hide TreeElementMa pping; 10 import '../../../lib/compiler/implementation/dart2jslib.dart' hide TreeElementMa pping;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 add$1(receiver, value) {} 49 add$1(receiver, value) {}
50 get$length(receiver) {} 50 get$length(receiver) {}
51 filter(receiver, predicate) {} 51 filter(receiver, predicate) {}
52 removeLast(receiver) {} 52 removeLast(receiver) {}
53 iterator(receiver) {} 53 iterator(receiver) {}
54 next(receiver) {} 54 next(receiver) {}
55 hasNext(receiver) {}'''; 55 hasNext(receiver) {}''';
56 56
57 const String DEFAULT_CORELIB = r''' 57 const String DEFAULT_CORELIB = r'''
58 print(var obj) {} 58 print(var obj) {}
59 abstract class int extends num {} 59 abstract class num {}
60 abstract class double extends num {} 60 abstract class int extends num { }
61 abstract class double extends num { }
61 class bool {} 62 class bool {}
62 class String {} 63 class String {}
63 class Object {} 64 class Object {}
64 abstract class num {}
65 class Function {} 65 class Function {}
66 interface List default ListImplementation { List([length]);} 66 interface List default ListImplementation { List([length]);}
67 class ListImplementation { factory List([length]) => null; } 67 class ListImplementation { factory List([length]) => null; }
68 abstract class Map {} 68 abstract class Map {}
69 class Closure {} 69 class Closure {}
70 class Null {} 70 class Null {}
71 class Dynamic_ {} 71 class Dynamic_ {}
72 bool identical(Object a, Object b) {}'''; 72 bool identical(Object a, Object b) {}''';
73 73
74 class MockCompiler extends Compiler { 74 class MockCompiler extends Compiler {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 }); 231 });
232 } 232 }
233 } 233 }
234 234
235 LibraryElement mockLibrary(Compiler compiler, String source) { 235 LibraryElement mockLibrary(Compiler compiler, String source) {
236 Uri uri = new Uri.fromComponents(scheme: "source"); 236 Uri uri = new Uri.fromComponents(scheme: "source");
237 var library = new LibraryElement(new Script(uri, new MockFile(source))); 237 var library = new LibraryElement(new Script(uri, new MockFile(source)));
238 importLibrary(library, compiler.coreLibrary, compiler); 238 importLibrary(library, compiler.coreLibrary, compiler);
239 return library; 239 return library;
240 } 240 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/cpa_inference_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698