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 type checks occur on native methods. | 5 // Test that type checks occur on native methods. |
6 | 6 |
| 7 import "package:expect/expect.dart"; |
7 import 'native_metadata.dart'; | 8 import 'native_metadata.dart'; |
8 | 9 |
9 @Native("*A") | 10 @Native("*A") |
10 class A { | 11 class A { |
11 @native int foo(int x); | 12 @native int foo(int x); |
12 @native int cmp(A other); | 13 @native int cmp(A other); |
13 } | 14 } |
14 | 15 |
15 @Native("*B") | 16 @Native("*B") |
16 class B { | 17 class B { |
(...skipping 119 matching lines...) Loading... |
136 | 137 |
137 main() { | 138 main() { |
138 setup(); | 139 setup(); |
139 | 140 |
140 if (isCheckedMode()) { | 141 if (isCheckedMode()) { |
141 checkedModeTest(); | 142 checkedModeTest(); |
142 } else { | 143 } else { |
143 uncheckedModeTest(); | 144 uncheckedModeTest(); |
144 } | 145 } |
145 } | 146 } |
OLD | NEW |