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

Unified Diff: tests/language/no_such_method_test.dart

Issue 11231074: Change signature of noSuchMethod to take an InvocationMirror. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merged dart2js changes into this CL. Created 8 years, 2 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: tests/language/no_such_method_test.dart
diff --git a/tests/language/no_such_method_test.dart b/tests/language/no_such_method_test.dart
index 138df66ea628cc26c15b1b3100b9f65be51c52b3..c7516d3dbe761298a99c2545046b6fa190ebdfe8 100644
--- a/tests/language/no_such_method_test.dart
+++ b/tests/language/no_such_method_test.dart
@@ -9,18 +9,16 @@ class NoSuchMethodTest {
return (10 * a) + b;
}
- noSuchMethod(String name, List args) {
- Expect.equals("moo", name);
- Expect.equals(1, args.length);
- return foo(args[0]);
+ noSuchMethod(InvocationMirror im) {
+ Expect.equals("moo", im.memberName);
+ Expect.equals(0, im.positionalArguments.length);
+ Expect.equals(1, im.namedArguments.length);
+ return foo(b:im.namedArguments["b"]);
}
static testMain() {
var obj = new NoSuchMethodTest();
- Expect.equals(1010, obj.moo(b:99)); // obj.NoSuchMethod called here.
- // After we remove the rest argument and change the signature of
- // noSuchMethod to be compatible with named arguments, we can expect the
- // correct value of 199 instead of 1010.
+ Expect.equals(199, obj.moo(b:99)); // obj.NoSuchMethod called here.
}
}

Powered by Google App Engine
This is Rietveld 408576698