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

Side by Side Diff: test/codegen/expect/language/static_inline_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/static_inline_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__static_inline_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 static_inline_test = Object.create(null);
11 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da rt.void, [])))();
12 static_inline_test.StringScanner = class StringScanner extends core.Object {
13 new() {
14 this.byteOffset = -1;
15 }
16 nextByte(foo) {
17 if (dart.test(foo)) return -2;
18 return static_inline_test.StringScanner.charAt((this.byteOffset = dart.not Null(this.byteOffset) + 1));
19 }
20 static charAt(index) {
21 return dart.notNull(static_inline_test.StringScanner.string[dartx.length]) > dart.notNull(core.num._check(index)) ? static_inline_test.StringScanner.strin g[dartx.codeUnitAt](core.int._check(index)) : -1;
22 }
23 };
24 dart.setSignature(static_inline_test.StringScanner, {
25 methods: () => ({nextByte: dart.definiteFunctionType(core.int, [dart.dynamic ])}),
26 statics: () => ({charAt: dart.definiteFunctionType(core.int, [dart.dynamic]) }),
27 names: ['charAt']
28 });
29 static_inline_test.StringScanner.string = null;
30 static_inline_test.main = function() {
31 let scanner = new static_inline_test.StringScanner();
32 static_inline_test.StringScanner.string = 'az9';
33 expect$.Expect.equals(97, scanner.nextByte(false));
34 expect$.Expect.equals(122, scanner.nextByte(false));
35 expect$.Expect.equals(57, scanner.nextByte(false));
36 expect$.Expect.equals(-1, scanner.nextByte(false));
37 };
38 dart.fn(static_inline_test.main, VoidTovoid());
39 // Exports:
40 exports.static_inline_test = static_inline_test;
41 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698