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

Side by Side Diff: test/codegen/expect/language/named_parameter_regression_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/named_parameter_regression_test', null, /* Import s */[
2 'dart_sdk'
3 ], function load__named_parameter_regression_test(exports, dart_sdk) {
4 'use strict';
5 const core = dart_sdk.core;
6 const dart = dart_sdk.dart;
7 const dartx = dart_sdk.dartx;
8 const named_parameter_regression_test = Object.create(null);
9 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
10 named_parameter_regression_test.Fisk = class Fisk extends core.Object {
11 foo(opts) {
12 let b = opts && 'b' in opts ? opts.b : null;
13 let a = opts && 'a' in opts ? opts.a : true;
14 if (b == null) return;
15 dart.throw('broken');
16 }
17 bar(opts) {
18 let a = opts && 'a' in opts ? opts.a : null;
19 let b = opts && 'b' in opts ? opts.b : true;
20 if (a == null) return;
21 dart.throw('broken');
22 }
23 };
24 dart.setSignature(named_parameter_regression_test.Fisk, {
25 methods: () => ({
26 foo: dart.definiteFunctionType(dart.dynamic, [], {b: dart.dynamic, a: dart .dynamic}),
27 bar: dart.definiteFunctionType(dart.dynamic, [], {a: dart.dynamic, b: dart .dynamic})
28 })
29 });
30 named_parameter_regression_test.main = function() {
31 new named_parameter_regression_test.Fisk().foo({a: true});
32 new named_parameter_regression_test.Fisk().bar({b: true});
33 };
34 dart.fn(named_parameter_regression_test.main, VoidTodynamic());
35 // Exports:
36 exports.named_parameter_regression_test = named_parameter_regression_test;
37 });
OLDNEW
« no previous file with comments | « test/codegen/expect/language/named_parameter_clash_test.js ('k') | test/codegen/expect/language/named_parameters2_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698