OLD | NEW |
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 #library("test_extension_test"); | 5 library test_extension_test; |
6 | 6 |
7 #import("dart:isolate"); | 7 import "dart:isolate"; |
8 #import('test_extension.dart'); | 8 import "test_extension.dart"; |
9 | 9 |
10 main() { | 10 main() { |
11 try { | 11 try { |
12 Cat.throwMeTheBall("ball"); | 12 Cat.throwMeTheBall("ball"); |
13 } on String catch (e) { | 13 } on String catch (e) { |
14 Expect.equals("ball", e); | 14 Expect.equals("ball", e); |
15 } | 15 } |
16 // Make sure the exception is thrown out to the event handler from C++ code. | 16 // Make sure the exception is thrown out to the event handler from C++ code. |
17 // The harness expects the string "ball" to be thrown and the process to | 17 // The harness expects the string "ball" to be thrown and the process to |
18 // end with an unhandled exception. | 18 // end with an unhandled exception. |
19 new Timer(0, (_) => Cat.throwMeTheBall("ball")); | 19 new Timer(0, (_) => Cat.throwMeTheBall("ball")); |
20 } | 20 } |
OLD | NEW |