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

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

Issue 14791005: BREAKING CHANGE: enforce part of directive (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 | « tests/language/multi_pass_b.dart ('k') | tests/language/private1.dart » ('j') | 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;
7
6 class GetName { 8 class GetName {
7 foo(a, b) => "foo"; 9 foo(a, b) => "foo";
8 } 10 }
9 11
10 String getName(im) => reflect(new GetName()).delegate(im); 12 String getName(im) => reflect(new GetName()).delegate(im);
11 13
12 class OverriddenNoSuchMethod { 14 class OverriddenNoSuchMethod {
13 15
14 OverriddenNoSuchMethod() {} 16 OverriddenNoSuchMethod() {}
15 17
16 noSuchMethod(Invocation mirror) { 18 noSuchMethod(Invocation mirror) {
17 Expect.equals("foo", getName(mirror)); 19 Expect.equals("foo", getName(mirror));
18 // 'foo' was called with two parameters (not counting receiver). 20 // 'foo' was called with two parameters (not counting receiver).
19 List args = mirror.positionalArguments; 21 List args = mirror.positionalArguments;
20 Expect.equals(2, args.length); 22 Expect.equals(2, args.length);
21 Expect.equals(101, args[0]); 23 Expect.equals(101, args[0]);
22 Expect.equals(202, args[1]); 24 Expect.equals(202, args[1]);
23 return 5; 25 return 5;
24 } 26 }
25 27
26 static testMain() { 28 static testMain() {
27 var obj = new OverriddenNoSuchMethod(); 29 var obj = new OverriddenNoSuchMethod();
28 Expect.equals(5, obj.foo(101, 202)); 30 Expect.equals(5, obj.foo(101, 202));
29 } 31 }
30 } 32 }
OLDNEW
« no previous file with comments | « tests/language/multi_pass_b.dart ('k') | tests/language/private1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698