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

Side by Side Diff: tests/compiler/dart2js_native/native_class_inheritance3_frog_test.dart

Issue 10891020: Update almost all tests (except co19) to use the new try-catch syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge. 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) 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 4
5 // Test to see if resolving a hidden native class's method to noSuchMethod 5 // Test to see if resolving a hidden native class's method to noSuchMethod
6 // interferes with subsequent resolving of the method. This might happen if the 6 // interferes with subsequent resolving of the method. This might happen if the
7 // noSuchMethod is cached on Object.prototype. 7 // noSuchMethod is cached on Object.prototype.
8 8
9 class A1 native "*A1" { 9 class A1 native "*A1" {
10 } 10 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 83
84 expectNoSuchMethod(() => b1.foo(3), 'b1.foo(3)'); 84 expectNoSuchMethod(() => b1.foo(3), 'b1.foo(3)');
85 expectNoSuchMethod(() => a1.foo(4), 'a1.foo(4)'); 85 expectNoSuchMethod(() => a1.foo(4), 'a1.foo(4)');
86 } 86 }
87 87
88 expectNoSuchMethod(action, note) { 88 expectNoSuchMethod(action, note) {
89 bool caught = false; 89 bool caught = false;
90 try { 90 try {
91 action(); 91 action();
92 } catch (var ex) { 92 } catch (ex) {
93 caught = true; 93 caught = true;
94 Expect.isTrue(ex is NoSuchMethodException, note); 94 Expect.isTrue(ex is NoSuchMethodException, note);
95 } 95 }
96 Expect.isTrue(caught, note); 96 Expect.isTrue(caught, note);
97 } 97 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698