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

Side by Side Diff: tests/compiler/dart2js_foreign/native_missing_method2_test.dart

Issue 10909166: Rename NoSuchMethodException to NoSuchMethodError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments Created 8 years, 3 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 @native("*A") 5 @native("*A")
6 class A { 6 class A {
7 } 7 }
8 8
9 @native makeA(); 9 @native makeA();
10 10
(...skipping 11 matching lines...) Expand all
22 class C { 22 class C {
23 // By having two 'foo' defined in the application, Frog will mangle 23 // By having two 'foo' defined in the application, Frog will mangle
24 // all calls to 'foo', which makes this test pass. 24 // all calls to 'foo', which makes this test pass.
25 foo(x) { return 43; } 25 foo(x) { return 43; }
26 } 26 }
27 27
28 typedContext() { 28 typedContext() {
29 var things = [ makeA(), new B() ]; 29 var things = [ makeA(), new B() ];
30 A a = things[0]; 30 A a = things[0];
31 Expect.throws(() => a.foo(), 31 Expect.throws(() => a.foo(),
32 (e) => e is NoSuchMethodException); 32 (e) => e is NoSuchMethodError);
33 Expect.throws(() => a.foo, 33 Expect.throws(() => a.foo,
34 (e) => e is NoSuchMethodException); 34 (e) => e is NoSuchMethodError);
35 Expect.throws(() => a.foo = 4, 35 Expect.throws(() => a.foo = 4,
36 (e) => e is NoSuchMethodException); 36 (e) => e is NoSuchMethodError);
37 } 37 }
38 38
39 untypedContext() { 39 untypedContext() {
40 var things = [ makeA(), new B() ]; 40 var things = [ makeA(), new B() ];
41 var a = things[0]; 41 var a = things[0];
42 Expect.throws(() => a.foo(), 42 Expect.throws(() => a.foo(),
43 (e) => e is NoSuchMethodException); 43 (e) => e is NoSuchMethodError);
44 Expect.throws(() => a.foo, 44 Expect.throws(() => a.foo,
45 (e) => e is NoSuchMethodException); 45 (e) => e is NoSuchMethodError);
46 Expect.throws(() => a.foo = 4, 46 Expect.throws(() => a.foo = 4,
47 (e) => e is NoSuchMethodException); 47 (e) => e is NoSuchMethodError);
48 } 48 }
49 49
50 main() { 50 main() {
51 setup(); 51 setup();
52 typedContext(); 52 typedContext();
53 untypedContext(); 53 untypedContext();
54 } 54 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698