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

Side by Side Diff: tests/language/overridden_no_such_method.dart

Issue 14788009: Fix another part-of related test failure (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 // Dart test program testing overridden messageNotUnderstood. 4 // Dart test program testing overridden messageNotUnderstood.
5 5
6 part of ManyOverriddenNoSuchMethodTest.dart; 6 part of OverriddenNoSuchMethodTest.dart;
7 7
8 class GetName { 8 class GetName {
9 foo(a, b) => "foo"; 9 foo(a, b) => "foo";
10 } 10 }
11 11
12 String getName(im) => reflect(new GetName()).delegate(im); 12 String getName(im) => reflect(new GetName()).delegate(im);
13 13
14 class OverriddenNoSuchMethod { 14 class OverriddenNoSuchMethod {
15 15
16 OverriddenNoSuchMethod() {} 16 OverriddenNoSuchMethod() {}
17 17
18 noSuchMethod(Invocation mirror) { 18 noSuchMethod(Invocation mirror) {
19 Expect.equals("foo", getName(mirror)); 19 Expect.equals("foo", getName(mirror));
20 // 'foo' was called with two parameters (not counting receiver). 20 // 'foo' was called with two parameters (not counting receiver).
21 List args = mirror.positionalArguments; 21 List args = mirror.positionalArguments;
22 Expect.equals(2, args.length); 22 Expect.equals(2, args.length);
23 Expect.equals(101, args[0]); 23 Expect.equals(101, args[0]);
24 Expect.equals(202, args[1]); 24 Expect.equals(202, args[1]);
25 return 5; 25 return 5;
26 } 26 }
27 27
28 static testMain() { 28 static testMain() {
29 var obj = new OverriddenNoSuchMethod(); 29 var obj = new OverriddenNoSuchMethod();
30 Expect.equals(5, obj.foo(101, 202)); 30 Expect.equals(5, obj.foo(101, 202));
31 } 31 }
32 } 32 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698