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

Side by Side Diff: test/codegen/expect/misc.js

Issue 1989663002: fix #470, string interpolation now respects Dart toString (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « test/codegen/expect/methods.js ('k') | test/codegen/expect/notnull.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 dart_library.library('misc', null, /* Imports */[ 1 dart_library.library('misc', null, /* Imports */[
2 'dart_sdk' 2 'dart_sdk'
3 ], function(exports, dart_sdk) { 3 ], function(exports, dart_sdk) {
4 'use strict'; 4 'use strict';
5 const core = dart_sdk.core; 5 const core = dart_sdk.core;
6 const dart = dart_sdk.dart; 6 const dart = dart_sdk.dart;
7 const dartx = dart_sdk.dartx; 7 const dartx = dart_sdk.dartx;
8 const misc = Object.create(null); 8 const misc = Object.create(null);
9 misc._Uninitialized = class _Uninitialized extends core.Object { 9 misc._Uninitialized = class _Uninitialized extends core.Object {
10 new() { 10 new() {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 ['=='](obj) { 45 ['=='](obj) {
46 return dart.is(obj, misc.Derived) && obj.z == this.z && super['=='](obj); 46 return dart.is(obj, misc.Derived) && obj.z == this.z && super['=='](obj);
47 } 47 }
48 }; 48 };
49 misc._isWhitespace = function(ch) { 49 misc._isWhitespace = function(ch) {
50 return ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t'; 50 return ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t';
51 }; 51 };
52 dart.fn(misc._isWhitespace, core.bool, [core.String]); 52 dart.fn(misc._isWhitespace, core.bool, [core.String]);
53 misc.expr = 'foo'; 53 misc.expr = 'foo';
54 misc._escapeMap = dart.const(dart.map({'\n': '\\n', '\r': '\\r', '\f': '\\f', '\b': '\\b', '\t': '\\t', '\v': '\\v', '': '\\x7F', [`\${${misc.expr}}`]: ''})) ; 54 misc._escapeMap = dart.const(dart.map({'\n': '\\n', '\r': '\\r', '\f': '\\f', '\b': '\\b', '\t': '\\t', '\v': '\\v', '': '\\x7F', [dart.str`\${${misc.expr}}` ]: ''}));
55 misc.main = function() { 55 misc.main = function() {
56 core.print(dart.toString(1)); 56 core.print(dart.toString(1));
57 core.print(dart.toString(1.0)); 57 core.print(dart.toString(1.0));
58 core.print(dart.toString(1.1)); 58 core.print(dart.toString(1.1));
59 let x = 42; 59 let x = 42;
60 core.print(dart.equals(x, dart.wrapType(dart.dynamic))); 60 core.print(dart.equals(x, dart.wrapType(dart.dynamic)));
61 core.print(dart.equals(x, dart.wrapType(misc.Generic))); 61 core.print(dart.equals(x, dart.wrapType(misc.Generic)));
62 core.print(new (misc.Generic$(core.int))().type); 62 core.print(new (misc.Generic$(core.int))().type);
63 core.print(dart.equals(new misc.Derived(), new misc.Derived())); 63 core.print(dart.equals(new misc.Derived(), new misc.Derived()));
64 new (misc.Generic$(core.int))().m(); 64 new (misc.Generic$(core.int))().m();
65 }; 65 };
66 dart.fn(misc.main); 66 dart.fn(misc.main);
67 // Exports: 67 // Exports:
68 exports.misc = misc; 68 exports.misc = misc;
69 }); 69 });
OLDNEW
« no previous file with comments | « test/codegen/expect/methods.js ('k') | test/codegen/expect/notnull.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698