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/language/map_literal5_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_literal5_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__map_literal5_test(exports, dart_sdk, expect) {
5 'use strict';
6 const core = dart_sdk.core;
7 const dart = dart_sdk.dart;
8 const dartx = dart_sdk.dartx;
9 const expect$ = expect.expect;
10 const map_literal5_test = Object.create(null);
11 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da rt.void, [])))();
12 let boolTovoid = () => (boolTovoid = dart.constFn(dart.definiteFunctionType(da rt.void, [core.bool])))();
13 let boolTodynamic = () => (boolTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [core.bool])))();
14 map_literal5_test.main = function() {
15 map_literal5_test.test(true);
16 map_literal5_test.test(false);
17 };
18 dart.fn(map_literal5_test.main, VoidTovoid());
19 map_literal5_test.test = function(b) {
20 let m = map_literal5_test.create(b);
21 expect$.Expect.equals(b, dart.dsend(m, 'containsKey', true));
22 expect$.Expect.equals(b, dart.dsend(m, 'containsKey', 2));
23 expect$.Expect.equals(b, dart.dsend(m, 'containsKey', 1));
24 expect$.Expect.equals(!dart.test(b), dart.dsend(m, 'containsKey', false));
25 expect$.Expect.equals(!dart.test(b), dart.dsend(m, 'containsKey', "bar"));
26 expect$.Expect.equals(!dart.test(b), dart.dsend(m, 'containsKey', "foo"));
27 if (dart.test(b)) {
28 expect$.Expect.equals(0, dart.dindex(m, true));
29 expect$.Expect.equals(3, dart.dindex(m, 2));
30 expect$.Expect.equals(2, dart.dindex(m, 1));
31 } else {
32 expect$.Expect.equals(0, dart.dindex(m, false));
33 expect$.Expect.equals("baz", dart.dindex(m, "bar"));
34 expect$.Expect.equals(2, dart.dindex(m, "foo"));
35 }
36 };
37 dart.fn(map_literal5_test.test, boolTovoid());
38 map_literal5_test.create = function(b) {
39 return dart.map([b, 0, map_literal5_test.m(b), map_literal5_test.n(b), dart. test(b) ? 1 : "foo", 2]);
40 };
41 dart.fn(map_literal5_test.create, boolTodynamic());
42 map_literal5_test.m = function(b) {
43 return dart.test(b) ? 2 : "bar";
44 };
45 dart.fn(map_literal5_test.m, boolTodynamic());
46 map_literal5_test.n = function(b) {
47 return dart.test(b) ? 3 : "baz";
48 };
49 dart.fn(map_literal5_test.n, boolTodynamic());
50 // Exports:
51 exports.map_literal5_test = map_literal5_test;
52 });
OLDNEW
« no previous file with comments | « test/codegen/expect/language/map_literal4_test.js ('k') | test/codegen/expect/language/map_literal6_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698