OLD | NEW |
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 that hidden native exception classes can be marked as existing. | 5 // Test that hidden native exception classes can be marked as existing. |
6 // | 6 // |
7 // To infer which native hidden types exist, we need | 7 // To infer which native hidden types exist, we need |
8 // (1) return types of native methods and getters | 8 // (1) return types of native methods and getters |
9 // (2) argument types of callbacks | 9 // (2) argument types of callbacks |
10 // (3) exceptions thrown by the operation. | 10 // (3) exceptions thrown by the operation. |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 threw = false; | 90 threw = false; |
91 try { | 91 try { |
92 var x = aa.op(51); | 92 var x = aa.op(51); |
93 } catch (E e) { | 93 } catch (E e) { |
94 threw = true; | 94 threw = true; |
95 Expect.equals(100, e.code); | 95 Expect.equals(100, e.code); |
96 Expect.isTrue(e is E); | 96 Expect.isTrue(e is E); |
97 } | 97 } |
98 Expect.isTrue(threw); | 98 Expect.isTrue(threw); |
99 } | 99 } |
OLD | NEW |