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

Side by Side Diff: test/codegen/expect/language/continue_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/continue_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__continue_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 continue_test = Object.create(null);
11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
12 continue_test.ContinueTest = class ContinueTest extends core.Object {
13 static testMain() {
14 let i = null;
15 let forCounter = 0;
16 for (i = 0; dart.notNull(i) < 10; i = dart.notNull(i) + 1) {
17 if (dart.notNull(i) > 3) continue;
18 forCounter++;
19 }
20 expect$.Expect.equals(4, forCounter);
21 expect$.Expect.equals(10, i);
22 i = 0;
23 let doWhileCounter = 0;
24 do {
25 i = dart.notNull(i) + 1;
26 if (dart.notNull(i) > 3) continue;
27 doWhileCounter++;
28 } while (dart.notNull(i) < 10);
29 expect$.Expect.equals(3, doWhileCounter);
30 expect$.Expect.equals(10, i);
31 i = 0;
32 let whileCounter = 0;
33 while (dart.notNull(i) < 10) {
34 i = dart.notNull(i) + 1;
35 if (dart.notNull(i) > 3) continue;
36 whileCounter++;
37 }
38 expect$.Expect.equals(3, whileCounter);
39 expect$.Expect.equals(10, i);
40 i = 0;
41 L:
42 while (dart.notNull(i) < 50) {
43 i = dart.notNull(i) + 3;
44 while (dart.notNull(i) < 30) {
45 i = dart.notNull(i) + 2;
46 if (dart.notNull(i) < 10) {
47 continue L;
48 } else {
49 i = dart.notNull(i) + 1;
50 break;
51 }
52 }
53 break;
54 }
55 expect$.Expect.equals(11, i);
56 do {
57 i = 20;
58 switch (0) {
59 case 0:
60 {
61 i = 22;
62 continue;
63 }
64 default:
65 {
66 i = 25;
67 break;
68 }
69 }
70 i = 30;
71 } while (false);
72 expect$.Expect.equals(22, i);
73 }
74 };
75 dart.setSignature(continue_test.ContinueTest, {
76 statics: () => ({testMain: dart.definiteFunctionType(dart.dynamic, [])}),
77 names: ['testMain']
78 });
79 continue_test.main = function() {
80 continue_test.ContinueTest.testMain();
81 };
82 dart.fn(continue_test.main, VoidTodynamic());
83 // Exports:
84 exports.continue_test = continue_test;
85 });
OLDNEW
« no previous file with comments | « test/codegen/expect/language/context_test.js ('k') | test/codegen/expect/language/core_type_check_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698