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

Side by Side Diff: test/codegen/expect/language/named_parameters_passing_false_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_parameters_passing_false_test', null, /* Im ports */[
2 'dart_sdk',
3 'expect'
4 ], function load__named_parameters_passing_false_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 named_parameters_passing_false_test = Object.create(null);
11 let __Tobool = () => (__Tobool = dart.constFn(dart.definiteFunctionType(core.b ool, [], [core.bool])))();
12 let __Tobool$ = () => (__Tobool$ = dart.constFn(dart.definiteFunctionType(core .bool, [], {value: core.bool})))();
13 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
14 named_parameters_passing_false_test.TestClass = class TestClass extends core.O bject {
15 new() {
16 }
17 method(value) {
18 if (value === void 0) value = null;
19 return value;
20 }
21 method2(opts) {
22 let value = opts && 'value' in opts ? opts.value : null;
23 return value;
24 }
25 static staticMethod(value) {
26 if (value === void 0) value = null;
27 return value;
28 }
29 static staticMethod2(opts) {
30 let value = opts && 'value' in opts ? opts.value : null;
31 return value;
32 }
33 };
34 dart.setSignature(named_parameters_passing_false_test.TestClass, {
35 constructors: () => ({new: dart.definiteFunctionType(named_parameters_passin g_false_test.TestClass, [])}),
36 methods: () => ({
37 method: dart.definiteFunctionType(core.bool, [], [core.bool]),
38 method2: dart.definiteFunctionType(core.bool, [], {value: core.bool})
39 }),
40 statics: () => ({
41 staticMethod: dart.definiteFunctionType(core.bool, [], [core.bool]),
42 staticMethod2: dart.definiteFunctionType(core.bool, [], {value: core.bool} )
43 }),
44 names: ['staticMethod', 'staticMethod2']
45 });
46 named_parameters_passing_false_test.globalMethod = function(value) {
47 if (value === void 0) value = null;
48 return value;
49 };
50 dart.fn(named_parameters_passing_false_test.globalMethod, __Tobool());
51 named_parameters_passing_false_test.globalMethod2 = function(opts) {
52 let value = opts && 'value' in opts ? opts.value : null;
53 return value;
54 };
55 dart.fn(named_parameters_passing_false_test.globalMethod2, __Tobool$());
56 named_parameters_passing_false_test.main = function() {
57 let obj = new named_parameters_passing_false_test.TestClass();
58 expect$.Expect.equals(null, obj.method());
59 expect$.Expect.equals(null, obj.method2());
60 expect$.Expect.equals(true, obj.method(true));
61 expect$.Expect.equals(true, obj.method2({value: true}));
62 expect$.Expect.equals(false, obj.method(false));
63 expect$.Expect.equals(false, obj.method2({value: false}));
64 expect$.Expect.equals(null, named_parameters_passing_false_test.TestClass.st aticMethod());
65 expect$.Expect.equals(null, named_parameters_passing_false_test.TestClass.st aticMethod2());
66 expect$.Expect.equals(true, named_parameters_passing_false_test.TestClass.st aticMethod(true));
67 expect$.Expect.equals(true, named_parameters_passing_false_test.TestClass.st aticMethod2({value: true}));
68 expect$.Expect.equals(false, named_parameters_passing_false_test.TestClass.s taticMethod(false));
69 expect$.Expect.equals(false, named_parameters_passing_false_test.TestClass.s taticMethod2({value: false}));
70 expect$.Expect.equals(null, named_parameters_passing_false_test.globalMethod ());
71 expect$.Expect.equals(null, named_parameters_passing_false_test.globalMethod 2());
72 expect$.Expect.equals(true, named_parameters_passing_false_test.globalMethod (true));
73 expect$.Expect.equals(true, named_parameters_passing_false_test.globalMethod 2({value: true}));
74 expect$.Expect.equals(false, named_parameters_passing_false_test.globalMetho d(false));
75 expect$.Expect.equals(false, named_parameters_passing_false_test.globalMetho d2({value: false}));
76 };
77 dart.fn(named_parameters_passing_false_test.main, VoidTodynamic());
78 // Exports:
79 exports.named_parameters_passing_false_test = named_parameters_passing_false_t est;
80 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698