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

Side by Side Diff: test/codegen/expect/language/do_while_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/do_while_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__do_while_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 do_while_test = Object.create(null);
11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
12 do_while_test.Helper = class Helper extends core.Object {
13 static f1(b) {
14 do
15 return 1;
16 while (dart.test(b));
17 return 2;
18 }
19 static f2(b) {
20 do {
21 return 1;
22 } while (dart.test(b));
23 return 2;
24 }
25 static f3(b) {
26 do
27 ;
28 while (dart.test(b));
29 return 2;
30 }
31 static f4(b) {
32 do {
33 } while (dart.test(b));
34 return 2;
35 }
36 static f5(n) {
37 let i = 0;
38 do {
39 i++;
40 } while (i < dart.notNull(n));
41 return i;
42 }
43 };
44 dart.setSignature(do_while_test.Helper, {
45 statics: () => ({
46 f1: dart.definiteFunctionType(core.int, [core.bool]),
47 f2: dart.definiteFunctionType(core.int, [core.bool]),
48 f3: dart.definiteFunctionType(core.int, [core.bool]),
49 f4: dart.definiteFunctionType(core.int, [core.bool]),
50 f5: dart.definiteFunctionType(core.int, [core.int])
51 }),
52 names: ['f1', 'f2', 'f3', 'f4', 'f5']
53 });
54 do_while_test.DoWhileTest = class DoWhileTest extends core.Object {
55 static testMain() {
56 expect$.Expect.equals(1, do_while_test.Helper.f1(true));
57 expect$.Expect.equals(1, do_while_test.Helper.f1(false));
58 expect$.Expect.equals(1, do_while_test.Helper.f2(true));
59 expect$.Expect.equals(1, do_while_test.Helper.f2(false));
60 expect$.Expect.equals(2, do_while_test.Helper.f3(false));
61 expect$.Expect.equals(2, do_while_test.Helper.f4(false));
62 expect$.Expect.equals(1, do_while_test.Helper.f5(-2));
63 expect$.Expect.equals(1, do_while_test.Helper.f5(-1));
64 expect$.Expect.equals(1, do_while_test.Helper.f5(0));
65 expect$.Expect.equals(1, do_while_test.Helper.f5(1));
66 expect$.Expect.equals(2, do_while_test.Helper.f5(2));
67 expect$.Expect.equals(3, do_while_test.Helper.f5(3));
68 }
69 };
70 dart.setSignature(do_while_test.DoWhileTest, {
71 statics: () => ({testMain: dart.definiteFunctionType(dart.dynamic, [])}),
72 names: ['testMain']
73 });
74 do_while_test.main = function() {
75 do_while_test.DoWhileTest.testMain();
76 };
77 dart.fn(do_while_test.main, VoidTodynamic());
78 // Exports:
79 exports.do_while_test = do_while_test;
80 });
OLDNEW
« no previous file with comments | « test/codegen/expect/language/do_while4_test.js ('k') | test/codegen/expect/language/double_comparison_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698