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

Side by Side Diff: test/codegen_expected/lib/convert/streamed_conversion_json_encode1_test.js

Issue 2211293002: Reify type params on map literals (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Suppress empty arg with dynamic params Created 4 years, 4 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
OLDNEW
1 dart_library.library('lib/convert/streamed_conversion_json_encode1_test', null, /* Imports */[ 1 dart_library.library('lib/convert/streamed_conversion_json_encode1_test', null, /* Imports */[
2 'dart_sdk', 2 'dart_sdk',
3 'async_helper', 3 'async_helper',
4 'expect' 4 'expect'
5 ], function load__streamed_conversion_json_encode1_test(exports, dart_sdk, async _helper, expect) { 5 ], function load__streamed_conversion_json_encode1_test(exports, dart_sdk, async _helper, expect) {
6 'use strict'; 6 'use strict';
7 const core = dart_sdk.core; 7 const core = dart_sdk.core;
8 const _interceptors = dart_sdk._interceptors; 8 const _interceptors = dart_sdk._interceptors;
9 const convert = dart_sdk.convert; 9 const convert = dart_sdk.convert;
10 const async = dart_sdk.async; 10 const async = dart_sdk.async;
(...skipping 10 matching lines...) Expand all
21 let ListOfObject = () => (ListOfObject = dart.constFn(core.List$(core.Object)) )(); 21 let ListOfObject = () => (ListOfObject = dart.constFn(core.List$(core.Object)) )();
22 let JSArrayOfListOfObject = () => (JSArrayOfListOfObject = dart.constFn(_inter ceptors.JSArray$(ListOfObject())))(); 22 let JSArrayOfListOfObject = () => (JSArrayOfListOfObject = dart.constFn(_inter ceptors.JSArray$(ListOfObject())))();
23 let StreamOfString = () => (StreamOfString = dart.constFn(async.Stream$(core.S tring)))(); 23 let StreamOfString = () => (StreamOfString = dart.constFn(async.Stream$(core.S tring)))();
24 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da rt.void, [])))(); 24 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da rt.void, [])))();
25 let ObjectToStreamOfString = () => (ObjectToStreamOfString = dart.constFn(dart .definiteFunctionType(StreamOfString(), [core.Object])))(); 25 let ObjectToStreamOfString = () => (ObjectToStreamOfString = dart.constFn(dart .definiteFunctionType(StreamOfString(), [core.Object])))();
26 let ListTodynamic = () => (ListTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [core.List])))(); 26 let ListTodynamic = () => (ListTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [core.List])))();
27 let StringAndObjectTovoid = () => (StringAndObjectTovoid = dart.constFn(dart.d efiniteFunctionType(dart.void, [core.String, core.Object])))(); 27 let StringAndObjectTovoid = () => (StringAndObjectTovoid = dart.constFn(dart.d efiniteFunctionType(dart.void, [core.String, core.Object])))();
28 let dynamicTovoid = () => (dynamicTovoid = dart.constFn(dart.definiteFunctionT ype(dart.void, [dart.dynamic])))(); 28 let dynamicTovoid = () => (dynamicTovoid = dart.constFn(dart.definiteFunctionT ype(dart.void, [dart.dynamic])))();
29 dart.defineLazy(streamed_conversion_json_encode1_test, { 29 dart.defineLazy(streamed_conversion_json_encode1_test, {
30 get TESTS() { 30 get TESTS() {
31 return JSArrayOfListOfObject().of([JSArrayOfObject().of([5, '5']), JSArray OfObject().of([-42, '-42']), JSArrayOfObject().of([3.14, '3.14']), JSArrayOfObje ct().of([true, 'true']), JSArrayOfObject().of([false, 'false']), JSArrayOfObject ().of([null, 'null']), JSArrayOfObject().of(['quote"or\'', '"quote\\"or\'"']), J SArrayOfObject().of(['', '""']), JSArrayOfObject().of([[], "[]"]), JSArrayOfObje ct().of([JSArrayOfObject().of([3, -4.5, true, "hi", false]), '[3,-4.5,true,"hi", false]']), JSArrayOfObject().of([[null], "[null]"]), JSArrayOfObject().of([JSArr ayOfList().of([[null]]), "[[null]]"]), JSArrayOfObject().of([JSArrayOfListOfint( ).of([JSArrayOfint().of([3])]), "[[3]]"]), JSArrayOfObject().of([dart.map(), "{} "]), JSArrayOfObject().of([dart.map({x: 3, y: 4.5, z: "hi", u: true, v: false}), '{"x":3,"y":4.5,"z":"hi","u":true,"v":false}']), JSArrayOfObject().of([dart.map ({x: null}), '{"x":null}']), JSArrayOfObject().of([dart.map({x: dart.map()}), '{ "x":{}}']), JSArrayOfObject().of([dart.map({"hi there": 499, "'": -0.0}), '{"hi there":499,"\'":0}']), JSArrayOfObject().of(['\\foo', '"\\\\foo"'])]); 31 return JSArrayOfListOfObject().of([JSArrayOfObject().of([5, '5']), JSArray OfObject().of([-42, '-42']), JSArrayOfObject().of([3.14, '3.14']), JSArrayOfObje ct().of([true, 'true']), JSArrayOfObject().of([false, 'false']), JSArrayOfObject ().of([null, 'null']), JSArrayOfObject().of(['quote"or\'', '"quote\\"or\'"']), J SArrayOfObject().of(['', '""']), JSArrayOfObject().of([[], "[]"]), JSArrayOfObje ct().of([JSArrayOfObject().of([3, -4.5, true, "hi", false]), '[3,-4.5,true,"hi", false]']), JSArrayOfObject().of([[null], "[null]"]), JSArrayOfObject().of([JSArr ayOfList().of([[null]]), "[[null]]"]), JSArrayOfObject().of([JSArrayOfListOfint( ).of([JSArrayOfint().of([3])]), "[[3]]"]), JSArrayOfObject().of([dart.map(), "{} "]), JSArrayOfObject().of([dart.map({x: 3, y: 4.5, z: "hi", u: true, v: false}, core.String, core.Object), '{"x":3,"y":4.5,"z":"hi","u":true,"v":false}']), JSAr rayOfObject().of([dart.map({x: null}, core.String, dart.dynamic), '{"x":null}']) , JSArrayOfObject().of([dart.map({x: dart.map()}, core.String, core.Map), '{"x": {}}']), JSArrayOfObject().of([dart.map({"hi there": 499, "'": -0.0}, core.String , core.num), '{"hi there":499,"\'":0}']), JSArrayOfObject().of(['\\foo', '"\\\\f oo"'])]);
32 } 32 }
33 }); 33 });
34 streamed_conversion_json_encode1_test.encode = function(o) { 34 streamed_conversion_json_encode1_test.encode = function(o) {
35 let encoder = new convert.JsonEncoder(); 35 let encoder = new convert.JsonEncoder();
36 let controller = null; 36 let controller = null;
37 controller = async.StreamController.new({onListen: dart.fn(() => { 37 controller = async.StreamController.new({onListen: dart.fn(() => {
38 controller.add(o); 38 controller.add(o);
39 controller.close(); 39 controller.close();
40 }, VoidTovoid())}); 40 }, VoidTovoid())});
41 return controller.stream.transform(core.String)(encoder); 41 return controller.stream.transform(core.String)(encoder);
(...skipping 29 matching lines...) Expand all
71 let o = test[dartx.get](0); 71 let o = test[dartx.get](0);
72 let expected = test[dartx.get](1); 72 let expected = test[dartx.get](1);
73 streamed_conversion_json_encode1_test.testNoPause(core.String._check(expec ted), o); 73 streamed_conversion_json_encode1_test.testNoPause(core.String._check(expec ted), o);
74 streamed_conversion_json_encode1_test.testWithPause(core.String._check(exp ected), o); 74 streamed_conversion_json_encode1_test.testWithPause(core.String._check(exp ected), o);
75 } 75 }
76 }; 76 };
77 dart.fn(streamed_conversion_json_encode1_test.main, VoidTovoid()); 77 dart.fn(streamed_conversion_json_encode1_test.main, VoidTovoid());
78 // Exports: 78 // Exports:
79 exports.streamed_conversion_json_encode1_test = streamed_conversion_json_encod e1_test; 79 exports.streamed_conversion_json_encode1_test = streamed_conversion_json_encod e1_test;
80 }); 80 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698