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

Side by Side Diff: test/codegen/expect/language/issue10721_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/issue10721_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__issue10721_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 issue10721_test = Object.create(null);
11 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da rt.void, [])))();
12 let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFun ctionType(dart.dynamic, [dart.dynamic])))();
13 let dynamic__ToString = () => (dynamic__ToString = dart.constFn(dart.definiteF unctionType(core.String, [dart.dynamic], {arg2: core.int})))();
14 let VoidToint = () => (VoidToint = dart.constFn(dart.definiteFunctionType(core .int, [])))();
15 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
16 let dynamicToFunction = () => (dynamicToFunction = dart.constFn(dart.definiteF unctionType(core.Function, [dart.dynamic])))();
17 issue10721_test.main = function() {
18 expect$.Expect.equals('', issue10721_test.useParameterInClosure(1));
19 expect$.Expect.equals(43, dart.dcall(issue10721_test.updateParameterInClosur e(1)));
20 };
21 dart.fn(issue10721_test.main, VoidTovoid());
22 issue10721_test.useParameterInClosure = function(arg1, opts) {
23 let arg2 = opts && 'arg2' in opts ? opts.arg2 : null;
24 if (core.Map.is(arg1)) {
25 return core.String._check(arg1[dartx.keys][dartx.map](dart.dynamic)(dart.f n(key => arg1[dartx.get](key), dynamicTodynamic()))[dartx.first]);
26 } else {
27 return '';
28 }
29 };
30 dart.fn(issue10721_test.useParameterInClosure, dynamic__ToString());
31 issue10721_test.updateParameterInClosure = function(arg1) {
32 if (core.Map.is(arg1)) {
33 return dart.fn(() => arg1 = 42, VoidToint());
34 } else {
35 return dart.fn(() => arg1 = dart.dsend(arg1, '+', 42), VoidTodynamic());
36 }
37 };
38 dart.fn(issue10721_test.updateParameterInClosure, dynamicToFunction());
39 // Exports:
40 exports.issue10721_test = issue10721_test;
41 });
OLDNEW
« no previous file with comments | « test/codegen/expect/language/issue10581_test.js ('k') | test/codegen/expect/language/issue10747_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698