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

Side by Side Diff: dart/tests/compiler/dart2js_extra/no_such_method_test.dart

Issue 14049009: Rename Invocation to InvocationMirror. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 6
7 class NoSuchMethodInfo { 7 class NoSuchMethodInfo {
8 Object receiver; 8 Object receiver;
9 String name; 9 String name;
10 List args; 10 List args;
11 NoSuchMethodInfo(Object r, String m, List a) 11 NoSuchMethodInfo(Object r, String m, List a)
12 : receiver = r, name = m, args = a; 12 : receiver = r, name = m, args = a;
13 } 13 }
14 14
15 class A { 15 class A {
16 noSuchMethod(InvocationMirror invocation) { 16 noSuchMethod(Invocation invocation) {
17 topLevelInfo = new NoSuchMethodInfo(this, invocation.memberName, 17 topLevelInfo = new NoSuchMethodInfo(this, invocation.memberName,
18 invocation.positionalArguments); 18 invocation.positionalArguments);
19 return topLevelInfo; 19 return topLevelInfo;
20 } 20 }
21 21
22 foo(a, b, c) { 22 foo(a, b, c) {
23 Expect.fail('Should never enter here'); 23 Expect.fail('Should never enter here');
24 } 24 }
25 } 25 }
26 26
(...skipping 18 matching lines...) Expand all
45 Expect.isTrue(info.args.length == 0); 45 Expect.isTrue(info.args.length == 0);
46 Expect.isTrue(identical(info.receiver, a)); 46 Expect.isTrue(identical(info.receiver, a));
47 47
48 a.bar = 2; 48 a.bar = 2;
49 info = topLevelInfo; 49 info = topLevelInfo;
50 Expect.equals('bar', info.name); 50 Expect.equals('bar', info.name);
51 Expect.isTrue(info.args.length == 1); 51 Expect.isTrue(info.args.length == 1);
52 Expect.isTrue(info.args[0] == 2); 52 Expect.isTrue(info.args[0] == 2);
53 Expect.isTrue(identical(info.receiver, a)); 53 Expect.isTrue(identical(info.receiver, a));
54 } 54 }
OLDNEW
« no previous file with comments | « dart/tests/compiler/dart2js_extra/dart2js_extra.status ('k') | dart/tests/language/invocation_mirror_invoke_on_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698