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

Side by Side Diff: test/codegen_expected/corelib/uri_parameters_all_test.js

Issue 2211293002: Reify type params on map literals (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Remove unnecessary null check 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('corelib/uri_parameters_all_test', null, /* Imports */[ 1 dart_library.library('corelib/uri_parameters_all_test', null, /* Imports */[
2 'dart_sdk', 2 'dart_sdk',
3 'expect' 3 'expect'
4 ], function load__uri_parameters_all_test(exports, dart_sdk, expect) { 4 ], function load__uri_parameters_all_test(exports, dart_sdk, expect) {
5 'use strict'; 5 'use strict';
6 const core = dart_sdk.core; 6 const core = dart_sdk.core;
7 const _interceptors = dart_sdk._interceptors; 7 const _interceptors = dart_sdk._interceptors;
8 const dart = dart_sdk.dart; 8 const dart = dart_sdk.dart;
9 const dartx = dart_sdk.dartx; 9 const dartx = dart_sdk.dartx;
10 const expect$ = expect.expect; 10 const expect$ = expect.expect;
11 const uri_parameters_all_test = Object.create(null); 11 const uri_parameters_all_test = Object.create(null);
12 let JSArrayOfString = () => (JSArrayOfString = dart.constFn(_interceptors.JSAr ray$(core.String)))(); 12 let JSArrayOfString = () => (JSArrayOfString = dart.constFn(_interceptors.JSAr ray$(core.String)))();
13 let ListOfString = () => (ListOfString = dart.constFn(core.List$(core.String)) )();
13 let MapOfString$dynamic = () => (MapOfString$dynamic = dart.constFn(core.Map$( core.String, dart.dynamic)))(); 14 let MapOfString$dynamic = () => (MapOfString$dynamic = dart.constFn(core.Map$( core.String, dart.dynamic)))();
14 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))(); 15 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
15 let ListTodynamic = () => (ListTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [core.List])))(); 16 let ListTodynamic = () => (ListTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [core.List])))();
16 let dynamicAnddynamicTodynamic = () => (dynamicAnddynamicTodynamic = dart.cons tFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart.dynamic])))(); 17 let dynamicAnddynamicTodynamic = () => (dynamicAnddynamicTodynamic = dart.cons tFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart.dynamic])))();
17 uri_parameters_all_test.main = function() { 18 uri_parameters_all_test.main = function() {
18 uri_parameters_all_test.testAll(JSArrayOfString().of(["a", "b", "c"])); 19 uri_parameters_all_test.testAll(JSArrayOfString().of(["a", "b", "c"]));
19 uri_parameters_all_test.testAll(JSArrayOfString().of([""])); 20 uri_parameters_all_test.testAll(JSArrayOfString().of([""]));
20 uri_parameters_all_test.testAll(JSArrayOfString().of(["a"])); 21 uri_parameters_all_test.testAll(JSArrayOfString().of(["a"]));
21 uri_parameters_all_test.testAll(JSArrayOfString().of(["", ""])); 22 uri_parameters_all_test.testAll(JSArrayOfString().of(["", ""]));
22 uri_parameters_all_test.testAll(JSArrayOfString().of(["baz"])); 23 uri_parameters_all_test.testAll(JSArrayOfString().of(["baz"]));
23 uri_parameters_all_test.testParse("z&y&w&z", dart.map({z: JSArrayOfString(). of(["", ""]), y: JSArrayOfString().of([""]), w: JSArrayOfString().of([""])})); 24 uri_parameters_all_test.testParse("z&y&w&z", dart.map({z: JSArrayOfString(). of(["", ""]), y: JSArrayOfString().of([""]), w: JSArrayOfString().of([""])}, cor e.String, ListOfString()));
24 uri_parameters_all_test.testParse("x=42&y=42&x=37&y=37", dart.map({x: JSArra yOfString().of(["42", "37"]), y: JSArrayOfString().of(["42", "37"])})); 25 uri_parameters_all_test.testParse("x=42&y=42&x=37&y=37", dart.map({x: JSArra yOfString().of(["42", "37"]), y: JSArrayOfString().of(["42", "37"])}, core.Strin g, ListOfString()));
25 uri_parameters_all_test.testParse("x&x&x&x&x", dart.map({x: JSArrayOfString( ).of(["", "", "", "", ""])})); 26 uri_parameters_all_test.testParse("x&x&x&x&x", dart.map({x: JSArrayOfString( ).of(["", "", "", "", ""])}, core.String, ListOfString()));
26 uri_parameters_all_test.testParse("x=&&y", dart.map({x: JSArrayOfString().of ([""]), y: JSArrayOfString().of([""])})); 27 uri_parameters_all_test.testParse("x=&&y", dart.map({x: JSArrayOfString().of ([""]), y: JSArrayOfString().of([""])}, core.String, ListOfString()));
27 }; 28 };
28 dart.fn(uri_parameters_all_test.main, VoidTodynamic()); 29 dart.fn(uri_parameters_all_test.main, VoidTodynamic());
29 uri_parameters_all_test.testAll = function(values) { 30 uri_parameters_all_test.testAll = function(values) {
30 let uri = core.Uri.new({scheme: "foo", path: "bar", queryParameters: dart.ma p({baz: values})}); 31 let uri = core.Uri.new({scheme: "foo", path: "bar", queryParameters: dart.ma p({baz: values}, core.String, dart.dynamic)});
31 let list = uri.queryParametersAll[dartx.get]("baz"); 32 let list = uri.queryParametersAll[dartx.get]("baz");
32 expect$.Expect.listEquals(values, list); 33 expect$.Expect.listEquals(values, list);
33 }; 34 };
34 dart.fn(uri_parameters_all_test.testAll, ListTodynamic()); 35 dart.fn(uri_parameters_all_test.testAll, ListTodynamic());
35 uri_parameters_all_test.testParse = function(query, results) { 36 uri_parameters_all_test.testParse = function(query, results) {
36 let uri = core.Uri.new({scheme: "foo", path: "bar", query: core.String._chec k(query)}); 37 let uri = core.Uri.new({scheme: "foo", path: "bar", query: core.String._chec k(query)});
37 let params = uri.queryParametersAll; 38 let params = uri.queryParametersAll;
38 for (let k of core.Iterable._check(dart.dload(results, 'keys'))) { 39 for (let k of core.Iterable._check(dart.dload(results, 'keys'))) {
39 expect$.Expect.listEquals(core.List._check(dart.dindex(results, k)), param s[dartx.get](k)); 40 expect$.Expect.listEquals(core.List._check(dart.dindex(results, k)), param s[dartx.get](k));
40 } 41 }
41 uri = core.Uri.new({scheme: "foo", path: "bar", queryParameters: MapOfString $dynamic()._check(results)}); 42 uri = core.Uri.new({scheme: "foo", path: "bar", queryParameters: MapOfString $dynamic()._check(results)});
42 params = uri.queryParametersAll; 43 params = uri.queryParametersAll;
43 for (let k of core.Iterable._check(dart.dload(results, 'keys'))) { 44 for (let k of core.Iterable._check(dart.dload(results, 'keys'))) {
44 expect$.Expect.listEquals(core.List._check(dart.dindex(results, k)), param s[dartx.get](k)); 45 expect$.Expect.listEquals(core.List._check(dart.dindex(results, k)), param s[dartx.get](k));
45 } 46 }
46 }; 47 };
47 dart.fn(uri_parameters_all_test.testParse, dynamicAnddynamicTodynamic()); 48 dart.fn(uri_parameters_all_test.testParse, dynamicAnddynamicTodynamic());
48 // Exports: 49 // Exports:
49 exports.uri_parameters_all_test = uri_parameters_all_test; 50 exports.uri_parameters_all_test = uri_parameters_all_test;
50 }); 51 });
OLDNEW
« no previous file with comments | « test/codegen_expected/corelib/uri_http_test.js ('k') | test/codegen_expected/corelib/uri_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698