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

Side by Side Diff: test/codegen/expect/language/map_literal10_test.js

Issue 2128353002: Check in codegen test expectations. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 5 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
(Empty)
1 dart_library.library('language/map_literal10_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__map_literal10_test(exports, dart_sdk, expect) {
5 'use strict';
6 const core = dart_sdk.core;
7 const _interceptors = dart_sdk._interceptors;
8 const dart = dart_sdk.dart;
9 const dartx = dart_sdk.dartx;
10 const expect$ = expect.expect;
11 const map_literal10_test = Object.create(null);
12 let JSArrayOfObject = () => (JSArrayOfObject = dart.constFn(_interceptors.JSAr ray$(core.Object)))();
13 let JSArrayOfString = () => (JSArrayOfString = dart.constFn(_interceptors.JSAr ray$(core.String)))();
14 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da rt.void, [])))();
15 let const$;
16 let const$0;
17 let const$1;
18 let const$2;
19 map_literal10_test.main = function() {
20 let m1 = const$ || (const$ = dart.const(dart.map(["__proto__", 0, 1, 1])));
21 expect$.Expect.isTrue(m1[dartx.containsKey]("__proto__"));
22 expect$.Expect.equals(0, m1[dartx.get]("__proto__"));
23 expect$.Expect.isTrue(m1[dartx.containsKey](1));
24 expect$.Expect.equals(1, m1[dartx.get](1));
25 expect$.Expect.listEquals(JSArrayOfObject().of(["__proto__", 1]), m1[dartx.k eys][dartx.toList]());
26 let m2 = const$0 || (const$0 = dart.const(dart.map([1, 0, "__proto__", 1]))) ;
27 expect$.Expect.isTrue(m2[dartx.containsKey](1));
28 expect$.Expect.equals(0, m2[dartx.get](1));
29 expect$.Expect.isTrue(m2[dartx.containsKey]("__proto__"));
30 expect$.Expect.equals(1, m2[dartx.get]("__proto__"));
31 expect$.Expect.listEquals(JSArrayOfObject().of([1, "__proto__"]), m2[dartx.k eys][dartx.toList]());
32 let m3 = const$1 || (const$1 = dart.const(dart.map({"1": 0, __proto__: 1}))) ;
33 expect$.Expect.isTrue(m3[dartx.containsKey]("1"));
34 expect$.Expect.equals(0, m3[dartx.get]("1"));
35 expect$.Expect.isTrue(m3[dartx.containsKey]("__proto__"));
36 expect$.Expect.equals(1, m3[dartx.get]("__proto__"));
37 expect$.Expect.listEquals(JSArrayOfString().of(["1", "__proto__"]), m3[dartx .keys][dartx.toList]());
38 let m4 = const$2 || (const$2 = dart.const(dart.map({__proto__: 1, "1": 2}))) ;
39 expect$.Expect.isTrue(m4[dartx.containsKey]("1"));
40 expect$.Expect.equals(2, m4[dartx.get]("1"));
41 expect$.Expect.isTrue(m4[dartx.containsKey]("__proto__"));
42 expect$.Expect.equals(1, m4[dartx.get]("__proto__"));
43 expect$.Expect.listEquals(JSArrayOfString().of(["__proto__", "1"]), m4[dartx .keys][dartx.toList]());
44 };
45 dart.fn(map_literal10_test.main, VoidTovoid());
46 // Exports:
47 exports.map_literal10_test = map_literal10_test;
48 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698