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

Unified Diff: test/codegen_expected/language/flatten_test_09_multi.js

Issue 2158173003: fix #603, support mock objects (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: add test 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 side-by-side diff with in-line comments
Download patch
Index: test/codegen_expected/language/flatten_test_09_multi.js
diff --git a/test/codegen_expected/language/flatten_test_09_multi.js b/test/codegen_expected/language/flatten_test_09_multi.js
index 4204aede4f9386ea1c82b2da59863d019a23226a..6792eace8ed3379200d3cf32a77d68a96c3c2827 100644
--- a/test/codegen_expected/language/flatten_test_09_multi.js
+++ b/test/codegen_expected/language/flatten_test_09_multi.js
@@ -12,10 +12,47 @@ dart_library.library('language/flatten_test_09_multi', null, /* Imports */[
let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
flatten_test_09_multi.Derived$ = dart.generic(T => {
let FutureOfT = () => (FutureOfT = dart.constFn(async.Future$(T)))();
+ let StreamOfT = () => (StreamOfT = dart.constFn(async.Stream$(T)))();
class Derived extends core.Object {
noSuchMethod(invocation) {
return super.noSuchMethod(invocation);
}
+ wait(T) {
+ return (futures, opts) => {
+ return async.Future$(core.List$(T))._check(this.noSuchMethod(new dart.InvocationImpl('wait', [futures], {namedArguments: opts, isMethod: true})));
+ };
+ }
+ any(T) {
+ return futures => {
+ return async.Future$(T)._check(this.noSuchMethod(new dart.InvocationImpl('any', [futures], {isMethod: true})));
+ };
+ }
+ forEach(input, f) {
+ return async.Future._check(this.noSuchMethod(new dart.InvocationImpl('forEach', [input, f], {isMethod: true})));
+ }
+ doWhile(f) {
+ return async.Future._check(this.noSuchMethod(new dart.InvocationImpl('doWhile', [f], {isMethod: true})));
+ }
+ then(S) {
+ return (onValue, opts) => {
+ return async.Future$(S)._check(this.noSuchMethod(new dart.InvocationImpl('then', [onValue], {namedArguments: opts, isMethod: true})));
+ };
+ }
+ catchError(onError, opts) {
+ return FutureOfT()._check(this.noSuchMethod(new dart.InvocationImpl('catchError', [onError], {namedArguments: opts, isMethod: true})));
+ }
+ whenComplete(action) {
+ return FutureOfT()._check(this.noSuchMethod(new dart.InvocationImpl('whenComplete', [action], {isMethod: true})));
+ }
+ asStream() {
+ return StreamOfT()._check(this.noSuchMethod(new dart.InvocationImpl('asStream', [], {isMethod: true})));
+ }
+ timeout(timeLimit, opts) {
+ return FutureOfT()._check(this.noSuchMethod(new dart.InvocationImpl('timeout', [timeLimit], {namedArguments: opts, isMethod: true})));
+ }
+ get _nullFuture() {
+ return async._Future._check(this.noSuchMethod(new dart.InvocationImpl('_nullFuture', [], {isGetter: true})));
+ }
}
dart.addTypeTests(Derived);
Derived[dart.implements] = () => [FutureOfT()];
@@ -25,10 +62,47 @@ dart_library.library('language/flatten_test_09_multi', null, /* Imports */[
flatten_test_09_multi.FixedPoint$ = dart.generic(T => {
let FixedPointOfT = () => (FixedPointOfT = dart.constFn(flatten_test_09_multi.FixedPoint$(T)))();
let FutureOfFixedPointOfT = () => (FutureOfFixedPointOfT = dart.constFn(async.Future$(FixedPointOfT())))();
+ let StreamOfFixedPointOfT = () => (StreamOfFixedPointOfT = dart.constFn(async.Stream$(FixedPointOfT())))();
class FixedPoint extends core.Object {
noSuchMethod(invocation) {
return super.noSuchMethod(invocation);
}
+ wait(T) {
+ return (futures, opts) => {
+ return async.Future$(core.List$(T))._check(this.noSuchMethod(new dart.InvocationImpl('wait', [futures], {namedArguments: opts, isMethod: true})));
+ };
+ }
+ any(T) {
+ return futures => {
+ return async.Future$(T)._check(this.noSuchMethod(new dart.InvocationImpl('any', [futures], {isMethod: true})));
+ };
+ }
+ forEach(input, f) {
+ return async.Future._check(this.noSuchMethod(new dart.InvocationImpl('forEach', [input, f], {isMethod: true})));
+ }
+ doWhile(f) {
+ return async.Future._check(this.noSuchMethod(new dart.InvocationImpl('doWhile', [f], {isMethod: true})));
+ }
+ then(S) {
+ return (onValue, opts) => {
+ return async.Future$(S)._check(this.noSuchMethod(new dart.InvocationImpl('then', [onValue], {namedArguments: opts, isMethod: true})));
+ };
+ }
+ catchError(onError, opts) {
+ return FutureOfFixedPointOfT()._check(this.noSuchMethod(new dart.InvocationImpl('catchError', [onError], {namedArguments: opts, isMethod: true})));
+ }
+ whenComplete(action) {
+ return FutureOfFixedPointOfT()._check(this.noSuchMethod(new dart.InvocationImpl('whenComplete', [action], {isMethod: true})));
+ }
+ asStream() {
+ return StreamOfFixedPointOfT()._check(this.noSuchMethod(new dart.InvocationImpl('asStream', [], {isMethod: true})));
+ }
+ timeout(timeLimit, opts) {
+ return FutureOfFixedPointOfT()._check(this.noSuchMethod(new dart.InvocationImpl('timeout', [timeLimit], {namedArguments: opts, isMethod: true})));
+ }
+ get _nullFuture() {
+ return async._Future._check(this.noSuchMethod(new dart.InvocationImpl('_nullFuture', [], {isGetter: true})));
+ }
}
dart.addTypeTests(FixedPoint);
FixedPoint[dart.implements] = () => [FutureOfFixedPointOfT()];
« no previous file with comments | « test/codegen_expected/language/flatten_test_08_multi.js ('k') | test/codegen_expected/language/flatten_test_10_multi.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698