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

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

Issue 2202673002: Adjust method parameters in noSuchMethod helper stubs (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 side-by-side diff with in-line comments
Download patch
Index: test/codegen_expected/language/no_such_method_mock_test.js
diff --git a/test/codegen_expected/language/no_such_method_mock_test.js b/test/codegen_expected/language/no_such_method_mock_test.js
index c7174245a49c2f99d7355c491408490ad07ff783..62ec19952ab89949ac9ae5a8f24549ef9ba2726a 100644
--- a/test/codegen_expected/language/no_such_method_mock_test.js
+++ b/test/codegen_expected/language/no_such_method_mock_test.js
@@ -29,19 +29,23 @@ dart_library.library('language/no_such_method_mock_test', null, /* Imports */[
return core.String.as(invocation.positionalArguments[dartx.get](0))[dartx.isNotEmpty];
}
eatFood(food) {
- return core.bool._check(this.noSuchMethod(new dart.InvocationImpl('eatFood', [food], {isMethod: true})));
+ let positionalArgs = [food];
+ return core.bool._check(this.noSuchMethod(new dart.InvocationImpl('eatFood', positionalArgs, {isMethod: true})));
}
scratch(furniture) {
- return core.int._check(this.noSuchMethod(new dart.InvocationImpl('scratch', [furniture], {isMethod: true})));
+ let positionalArgs = [furniture];
+ return core.int._check(this.noSuchMethod(new dart.InvocationImpl('scratch', positionalArgs, {isMethod: true})));
}
};
no_such_method_mock_test.MockCat[dart.implements] = () => [no_such_method_mock_test.Cat];
no_such_method_mock_test.MockCat2 = class MockCat2 extends no_such_method_mock_test.MockCat {
eatFood(food) {
- return core.bool._check(this.noSuchMethod(new dart.InvocationImpl('eatFood', [food], {isMethod: true})));
+ let positionalArgs = [food];
+ return core.bool._check(this.noSuchMethod(new dart.InvocationImpl('eatFood', positionalArgs, {isMethod: true})));
}
scratch(furniture) {
- return core.int._check(this.noSuchMethod(new dart.InvocationImpl('scratch', [furniture], {isMethod: true})));
+ let positionalArgs = [furniture];
+ return core.int._check(this.noSuchMethod(new dart.InvocationImpl('scratch', positionalArgs, {isMethod: true})));
}
};
let const$;
@@ -50,10 +54,17 @@ dart_library.library('language/no_such_method_mock_test', null, /* Imports */[
return dart.test(core.String.as(invocation.positionalArguments[dartx.get](0))[dartx.isNotEmpty]) && dart.test(dart.dsend(invocation.namedArguments[dartx.get](const$ || (const$ = dart.const(core.Symbol.new('amount')))), '>', 0.5));
}
eatFood(food, opts) {
- return core.bool._check(this.noSuchMethod(new dart.InvocationImpl('eatFood', [food], {namedArguments: opts, isMethod: true})));
+ let positionalArgs = [food];
+ return core.bool._check(this.noSuchMethod(new dart.InvocationImpl('eatFood', positionalArgs, {namedArguments: opts, isMethod: true})));
}
scratch(furniture, furniture2) {
- return core.int._check(this.noSuchMethod(new dart.InvocationImpl('scratch', [furniture, furniture2], {isMethod: true})));
+ let positionalArgs = [furniture];
+ for (let arg of [furniture2]) {
+ if (arg !== void 0) {
+ positionalArgs.push(arg);
+ }
+ }
+ return core.int._check(this.noSuchMethod(new dart.InvocationImpl('scratch', positionalArgs, {isMethod: true})));
}
};
no_such_method_mock_test.MockCat3[dart.implements] = () => [no_such_method_mock_test.Cat];
@@ -63,7 +74,8 @@ dart_library.library('language/no_such_method_mock_test', null, /* Imports */[
}
doStuff(T) {
return t => {
- return T._check(this.noSuchMethod(new dart.InvocationImpl('doStuff', [t], {isMethod: true})));
+ let positionalArgs = [t];
+ return T._check(this.noSuchMethod(new dart.InvocationImpl('doStuff', positionalArgs, {isMethod: true})));
};
}
};

Powered by Google App Engine
This is Rietveld 408576698