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

Side by Side Diff: test/codegen/expect/language/for_in_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/for_in_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__for_in_test(exports, dart_sdk, expect) {
5 'use strict';
6 const core = dart_sdk.core;
7 const _interceptors = dart_sdk._interceptors;
8 const dart = dart_sdk.dart;
9 const dartx = dart_sdk.dartx;
10 const expect$ = expect.expect;
11 const for_in_test = Object.create(null);
12 let JSArrayOfint = () => (JSArrayOfint = dart.constFn(_interceptors.JSArray$(c ore.int)))();
13 let ListOfString = () => (ListOfString = dart.constFn(core.List$(core.String)) )();
14 let JSArrayOfListOfString = () => (JSArrayOfListOfString = dart.constFn(_inter ceptors.JSArray$(ListOfString())))();
15 let ListOfListOfString = () => (ListOfListOfString = dart.constFn(core.List$(L istOfString())))();
16 let JSArrayOfListOfListOfString = () => (JSArrayOfListOfListOfString = dart.co nstFn(_interceptors.JSArray$(ListOfListOfString())))();
17 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
18 for_in_test.ForInTest = class ForInTest extends core.Object {
19 static testMain() {
20 for_in_test.ForInTest.testSimple();
21 for_in_test.ForInTest.testGenericSyntax1();
22 for_in_test.ForInTest.testGenericSyntax2();
23 for_in_test.ForInTest.testGenericSyntax3();
24 for_in_test.ForInTest.testGenericSyntax4();
25 }
26 static testSimple() {
27 let list = JSArrayOfint().of([1, 3, 5]);
28 let sum = 0;
29 for (let i of list) {
30 sum = sum + dart.notNull(i);
31 }
32 expect$.Expect.equals(9, sum);
33 }
34 static testGenericSyntax1() {
35 let aCollection = JSArrayOfListOfString().of([]);
36 for (let strArrArr of aCollection) {
37 }
38 }
39 static testGenericSyntax2() {
40 let aCollection = JSArrayOfListOfString().of([]);
41 let strArrArr = null;
42 for (strArrArr of aCollection) {
43 }
44 }
45 static testGenericSyntax3() {
46 let aCollection = JSArrayOfListOfListOfString().of([]);
47 for (let strArrArr of aCollection) {
48 }
49 }
50 static testGenericSyntax4() {
51 let aCollection = JSArrayOfListOfListOfString().of([]);
52 let strArrArr = null;
53 for (strArrArr of aCollection) {
54 }
55 }
56 };
57 dart.setSignature(for_in_test.ForInTest, {
58 statics: () => ({
59 testMain: dart.definiteFunctionType(dart.dynamic, []),
60 testSimple: dart.definiteFunctionType(dart.void, []),
61 testGenericSyntax1: dart.definiteFunctionType(dart.void, []),
62 testGenericSyntax2: dart.definiteFunctionType(dart.void, []),
63 testGenericSyntax3: dart.definiteFunctionType(dart.void, []),
64 testGenericSyntax4: dart.definiteFunctionType(dart.void, [])
65 }),
66 names: ['testMain', 'testSimple', 'testGenericSyntax1', 'testGenericSyntax2' , 'testGenericSyntax3', 'testGenericSyntax4']
67 });
68 for_in_test.main = function() {
69 for_in_test.ForInTest.testMain();
70 };
71 dart.fn(for_in_test.main, VoidTodynamic());
72 // Exports:
73 exports.for_in_test = for_in_test;
74 });
OLDNEW
« no previous file with comments | « test/codegen/expect/language/for_in_side_effects_test.js ('k') | test/codegen/expect/language/for_inlining_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698