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

Side by Side Diff: test/codegen/expect/language/switch_label2_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/switch_label2_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__switch_label2_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 switch_label2_test = Object.create(null);
12 let JSArrayOfint = () => (JSArrayOfint = dart.constFn(_interceptors.JSArray$(c ore.int)))();
13 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da rt.void, [])))();
14 let intAndListTovoid = () => (intAndListTovoid = dart.constFn(dart.definiteFun ctionType(dart.void, [core.int, core.List])))();
15 switch_label2_test.main = function() {
16 switch_label2_test.doSwitch(0, JSArrayOfint().of([0, 2]));
17 switch_label2_test.doSwitch(1, JSArrayOfint().of([1]));
18 switch_label2_test.doSwitch(2, JSArrayOfint().of([2]));
19 switch_label2_test.doSwitch(3, JSArrayOfint().of([3, 1]));
20 };
21 dart.fn(switch_label2_test.main, VoidTovoid());
22 switch_label2_test.doSwitch = function(target, expect) {
23 let list = [];
24 switch (target) {
25 case 0:
26 {
27 list[dartx.add](0);
28 continue case2;
29 }
30 case 1:
31 {
32 // Unimplemented case labels: [case1:]
33 list[dartx.add](1);
34 break;
35 }
36 case 2:
37 {
38 // Unimplemented case labels: [case2:]
39 list[dartx.add](2);
40 break;
41 }
42 case 3:
43 {
44 list[dartx.add](3);
45 continue case1;
46 }
47 }
48 expect$.Expect.listEquals(expect, list);
49 };
50 dart.fn(switch_label2_test.doSwitch, intAndListTovoid());
51 // Exports:
52 exports.switch_label2_test = switch_label2_test;
53 });
OLDNEW
« no previous file with comments | « test/codegen/expect/language/switch_fallthru_test.js ('k') | test/codegen/expect/language/switch_label_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698