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

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

Issue 574683002: Use ConstExp for storing constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 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
« no previous file with comments | « tests/compiler/dart2js/mock_compiler.dart ('k') | tests/compiler/dart2js/type_test_helper.dart » ('j') | 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 // Library for creating mock versions of platform and internal libraries. 5 // Library for creating mock versions of platform and internal libraries.
6 6
7 library mock_libraries; 7 library mock_libraries;
8 8
9 String buildLibrarySource( 9 String buildLibrarySource(
10 Map<String, String> elementMap, 10 Map<String, String> elementMap,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 E get first => null; 48 E get first => null;
49 E get last => null; 49 E get last => null;
50 E get single => null; 50 E get single => null;
51 E removeLast() => null; 51 E removeLast() => null;
52 E removeAt(i) => null; 52 E removeAt(i) => null;
53 E elementAt(i) => null; 53 E elementAt(i) => null;
54 E singleWhere(f) => null; 54 E singleWhere(f) => null;
55 }''', 55 }''',
56 'Map': 'abstract class Map<K,V> {}', 56 'Map': 'abstract class Map<K,V> {}',
57 'Null': 'class Null {}', 57 'Null': 'class Null {}',
58 'num': 'abstract class num {}', 58 'num': r'''
59 abstract class num {
60 operator +(_);
61 operator *(_);
62 operator -();
63 }''',
59 'print': 'print(var obj) {}', 64 'print': 'print(var obj) {}',
60 'proxy': 'const proxy = 0;', 65 'proxy': 'const proxy = 0;',
61 'Object': r''' 66 'Object': r'''
62 class Object { 67 class Object {
63 const Object(); 68 const Object();
64 operator ==(other) { return true; } 69 operator ==(other) { return true; }
65 get hashCode => throw "Object.hashCode not implemented."; 70 get hashCode => throw "Object.hashCode not implemented.";
66 String toString() { return null; } 71 String toString() { return null; }
67 noSuchMethod(im) { throw im; } 72 noSuchMethod(im) { throw im; }
68 }''', 73 }''',
69 'StackTrace': 'abstract class StackTrace {}', 74 'StackTrace': 'abstract class StackTrace {}',
70 'String': 'class String implements Pattern {}', 75 'String': 'class String implements Pattern {}',
76 'Symbol': 'class Symbol { final name; const Symbol(this.name); }',
71 'Type': 'class Type {}', 77 'Type': 'class Type {}',
72 'Pattern': 'abstract class Pattern {}', 78 'Pattern': 'abstract class Pattern {}',
73 }; 79 };
74 80
75 const String DEFAULT_PATCH_CORE_SOURCE = r''' 81 const String DEFAULT_PATCH_CORE_SOURCE = r'''
76 import 'dart:_js_helper'; 82 import 'dart:_js_helper';
77 import 'dart:_interceptors'; 83 import 'dart:_interceptors';
78 import 'dart:_isolate_helper'; 84 import 'dart:_isolate_helper';
79 '''; 85 ''';
80 86
(...skipping 28 matching lines...) Expand all
109 r'''checkFunctionSubtype(var target, String signatureName, 115 r'''checkFunctionSubtype(var target, String signatureName,
110 String contextName, var context, 116 String contextName, var context,
111 var typeArguments) {}''', 117 var typeArguments) {}''',
112 'checkMalformedType': 'checkMalformedType(value, message) {}', 118 'checkMalformedType': 'checkMalformedType(value, message) {}',
113 'Closure': 'abstract class Closure implements Function { }', 119 'Closure': 'abstract class Closure implements Function { }',
114 'closureFromTearOff': 120 'closureFromTearOff':
115 r'''closureFromTearOff(receiver, functions, reflectionInfo, 121 r'''closureFromTearOff(receiver, functions, reflectionInfo,
116 isStatic, jsArguments, name) {}''', 122 isStatic, jsArguments, name) {}''',
117 'computeSignature': 123 'computeSignature':
118 'computeSignature(var signature, var context, var contextName) {}', 124 'computeSignature(var signature, var context, var contextName) {}',
119 'ConstantMap': 'class ConstantMap {}', 125 'ConstantMap': 'class ConstantMap<K, V> {}',
120 'ConstantProtoMap': 'class ConstantProtoMap {}', 126 'ConstantProtoMap': 'class ConstantProtoMap<K, V> {}',
121 'ConstantStringMap': 'class ConstantStringMap {}', 127 'ConstantStringMap': 'class ConstantStringMap<K, V> {}',
122 'copyTypeArguments': 'copyTypeArguments(source, target) {}', 128 'copyTypeArguments': 'copyTypeArguments(source, target) {}',
123 'createInvocationMirror': 'createInvocationMirror(a0, a1, a2, a3, a4, a5) {}', 129 'createInvocationMirror': 'createInvocationMirror(a0, a1, a2, a3, a4, a5) {}',
124 'createRuntimeType': 'createRuntimeType(a) {}', 130 'createRuntimeType': 'createRuntimeType(a) {}',
125 'doubleTypeCast': 'doubleTypeCast(value) {}', 131 'doubleTypeCast': 'doubleTypeCast(value) {}',
126 'doubleTypeCheck': 'doubleTypeCheck(value) {}', 132 'doubleTypeCheck': 'doubleTypeCheck(value) {}',
127 'functionSubtypeCast': 133 'functionSubtypeCast':
128 r'''functionSubtypeCast(Object object, String signatureName, 134 r'''functionSubtypeCast(Object object, String signatureName,
129 String contextName, var context) {}''', 135 String contextName, var context) {}''',
130 'functionTypeTestMetaHelper': r''' 136 'functionTypeTestMetaHelper': r'''
131 functionTypeTestMetaHelper() { 137 functionTypeTestMetaHelper() {
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 '_callInIsolate': 'var _callInIsolate;', 348 '_callInIsolate': 'var _callInIsolate;',
343 '_WorkerBase': 'class _WorkerBase {}', 349 '_WorkerBase': 'class _WorkerBase {}',
344 }; 350 };
345 351
346 const Map<String, String> DEFAULT_MIRRORS_LIBRARY = const <String, String>{ 352 const Map<String, String> DEFAULT_MIRRORS_LIBRARY = const <String, String>{
347 'Comment': 'class Comment {}', 353 'Comment': 'class Comment {}',
348 'MirrorSystem': 'class MirrorSystem {}', 354 'MirrorSystem': 'class MirrorSystem {}',
349 'MirrorsUsed': 'class MirrorsUsed {}', 355 'MirrorsUsed': 'class MirrorsUsed {}',
350 }; 356 };
351 357
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/mock_compiler.dart ('k') | tests/compiler/dart2js/type_test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698