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

Side by Side Diff: test/codegen/expect/language/cascade_in_expression_function_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/cascade_in_expression_function_test', null, /* Im ports */[
2 'dart_sdk',
3 'expect'
4 ], function load__cascade_in_expression_function_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 cascade_in_expression_function_test = Object.create(null);
11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
12 cascade_in_expression_function_test.makeMap = function() {
13 return (() => {
14 let _ = core.Map.new();
15 _[dartx.set](3, 4);
16 _[dartx.set](0, 11);
17 return _;
18 })();
19 };
20 dart.fn(cascade_in_expression_function_test.makeMap, VoidTodynamic());
21 cascade_in_expression_function_test.MyClass = class MyClass extends core.Objec t {
22 foo() {
23 return (() => {
24 this.bar(3);
25 this.baz(4);
26 return this;
27 })();
28 }
29 bar(x) {
30 return x;
31 }
32 baz(y) {
33 return dart.dsend(y, '*', 2);
34 }
35 };
36 dart.setSignature(cascade_in_expression_function_test.MyClass, {
37 methods: () => ({
38 foo: dart.definiteFunctionType(dart.dynamic, []),
39 bar: dart.definiteFunctionType(dart.dynamic, [dart.dynamic]),
40 baz: dart.definiteFunctionType(dart.dynamic, [dart.dynamic])
41 })
42 });
43 cascade_in_expression_function_test.main = function() {
44 let o = new cascade_in_expression_function_test.MyClass();
45 expect$.Expect.equals(o.foo(), o);
46 let g = cascade_in_expression_function_test.makeMap();
47 expect$.Expect.equals(dart.dindex(g, 3), 4);
48 expect$.Expect.equals(dart.dindex(g, 0), 11);
49 };
50 dart.fn(cascade_in_expression_function_test.main, VoidTodynamic());
51 // Exports:
52 exports.cascade_in_expression_function_test = cascade_in_expression_function_t est;
53 });
OLDNEW
« no previous file with comments | « test/codegen/expect/language/cascade_2_test.js ('k') | test/codegen/expect/language/cascade_in_initializer_list_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698