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

Unified Diff: tests/language/no_such_method_test.dart

Issue 12499005: dart2js: Create noSuchMethod handlers at runtime to reduce overhead. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reordered some stuff due to code review feedback Created 7 years, 9 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 0bd9da381a9823f415732e29e8d963e0965a32b2..a38fe8e078d7cf313e0199c0851c7ee8bb7d3b76 100644
--- a/tests/language/no_such_method_test.dart
+++ b/tests/language/no_such_method_test.dart
@@ -3,6 +3,13 @@
// BSD-style license that can be found in the LICENSE file.
// Dart test program testing that NoSuchMethod is properly called.
+class GetName {
+ foo({a, b}) => "foo";
+ moo({b}) => "moo";
+}
+
+static String getName(im) => im.invokeOn(new GetName());
+
class NoSuchMethodTest {
foo({a : 10, b : 20}) {
@@ -10,7 +17,7 @@ class NoSuchMethodTest {
}
noSuchMethod(InvocationMirror im) {
- Expect.equals("moo", im.memberName);
+ Expect.equals("moo", getName(im));
Expect.equals(0, im.positionalArguments.length);
Expect.equals(1, im.namedArguments.length);
return foo(b:im.namedArguments["b"]);

Powered by Google App Engine
This is Rietveld 408576698