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

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

Issue 10920066: issue 4817 fixed. Implemented raw strings with 'r' instead of '@' for dart2js (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased. Marked raw_string_test as pass for dart2js-ff and dart2dart Created 8 years, 3 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");
11 #import('../../../lib/compiler/implementation/source_file.dart'); 11 #import('../../../lib/compiler/implementation/source_file.dart');
12 #import("../../../lib/compiler/implementation/tree/tree.dart"); 12 #import("../../../lib/compiler/implementation/tree/tree.dart");
13 #import("../../../lib/compiler/implementation/util/util.dart"); 13 #import("../../../lib/compiler/implementation/util/util.dart");
14 #import('../../../lib/compiler/compiler.dart', prefix: 'api'); 14 #import('../../../lib/compiler/compiler.dart', prefix: 'api');
15 #import("parser_helper.dart"); 15 #import("parser_helper.dart");
16 16
17 class WarningMessage { 17 class WarningMessage {
18 Node node; 18 Node node;
19 Message message; 19 Message message;
20 WarningMessage(this.node, this.message); 20 WarningMessage(this.node, this.message);
21 21
22 toString() => message.toString(); 22 toString() => message.toString();
23 } 23 }
24 24
25 const String DEFAULT_HELPERLIB = @''' 25 const String DEFAULT_HELPERLIB = r'''
26 lt() {} add(var a, var b) {} sub() {} mul() {} div() {} tdiv() {} mod() {} 26 lt() {} add(var a, var b) {} sub() {} mul() {} div() {} tdiv() {} mod() {}
27 neg() {} shl() {} shr() {} eq() {} le() {} gt() {} ge() {} 27 neg() {} shl() {} shr() {} eq() {} le() {} gt() {} ge() {}
28 or() {} and() {} not() {} eqNull(a) {} eqq() {} 28 or() {} and() {} not() {} eqNull(a) {} eqq() {}
29 ltB() {} leB() {} eqB() {} gtB() {} geB() {} eqNullB(a) {} 29 ltB() {} leB() {} eqB() {} gtB() {} geB() {} eqNullB(a) {}
30 $throw(x) { return x; } 30 $throw(x) { return x; }
31 iae(x) { throw x; } ioore(x) { throw x; } 31 iae(x) { throw x; } ioore(x) { throw x; }
32 guard$array(x) { return x; } 32 guard$array(x) { return x; }
33 guard$num(x) { return x; } 33 guard$num(x) { return x; }
34 guard$string(x) { return x; } 34 guard$string(x) { return x; }
35 guard$stringOrArray(x) { return x; } 35 guard$stringOrArray(x) { return x; }
36 index(a, index) {} 36 index(a, index) {}
37 indexSet(a, index, value) {} 37 indexSet(a, index, value) {}
38 setRuntimeTypeInfo(a, b) {} 38 setRuntimeTypeInfo(a, b) {}
39 getRuntimeTypeInfo(a) {} 39 getRuntimeTypeInfo(a) {}
40 stringTypeCheck(x) {} 40 stringTypeCheck(x) {}
41 interface JavaScriptIndexingBehavior {} 41 interface JavaScriptIndexingBehavior {}
42 S() {} 42 S() {}
43 assert(a){}'''; 43 assert(a){}''';
44 44
45 const String DEFAULT_INTERCEPTORSLIB = @''' 45 const String DEFAULT_INTERCEPTORSLIB = r'''
46 add$1(receiver, value) {} 46 add$1(receiver, value) {}
47 get$length(receiver) {} 47 get$length(receiver) {}
48 filter(receiver, predicate) {} 48 filter(receiver, predicate) {}
49 removeLast(receiver) {} 49 removeLast(receiver) {}
50 iterator(receiver) {} 50 iterator(receiver) {}
51 next(receiver) {} 51 next(receiver) {}
52 hasNext(receiver) {}'''; 52 hasNext(receiver) {}''';
53 53
54 const String DEFAULT_CORELIB = @''' 54 const String DEFAULT_CORELIB = r'''
55 print(var obj) {} 55 print(var obj) {}
56 interface int extends num {} 56 interface int extends num {}
57 interface double extends num {} 57 interface double extends num {}
58 class bool {} 58 class bool {}
59 class String {} 59 class String {}
60 class Object {} 60 class Object {}
61 interface num {} 61 interface num {}
62 class Function {} 62 class Function {}
63 class List {} 63 class List {}
64 class Closure {} 64 class Closure {}
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 }); 212 });
213 } 213 }
214 } 214 }
215 215
216 LibraryElement mockLibrary(Compiler compiler, String source) { 216 LibraryElement mockLibrary(Compiler compiler, String source) {
217 Uri uri = new Uri.fromComponents(scheme: "source"); 217 Uri uri = new Uri.fromComponents(scheme: "source");
218 var library = new LibraryElement(new Script(uri, new MockFile(source))); 218 var library = new LibraryElement(new Script(uri, new MockFile(source)));
219 importLibrary(library, compiler.coreLibrary, compiler); 219 importLibrary(library, compiler.coreLibrary, compiler);
220 return library; 220 return library;
221 } 221 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/loop_test.dart ('k') | tests/compiler/dart2js/no_constructor_body_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698