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 import "package:expect/expect.dart"; | |
6 | |
7 // Test that various type errors doesn't invoke user-defined code | 5 // Test that various type errors doesn't invoke user-defined code |
8 // during error reporting. | 6 // during error reporting. |
9 | 7 |
10 class MyClass {} | 8 class MyClass {} |
11 | 9 |
12 class IntTypeError { | 10 class IntTypeError { |
13 toString() { | 11 toString() { |
14 int value = wrap(this); | 12 int value = wrap(this); |
15 return super.toString(); | 13 return super.toString(); |
16 } | 14 } |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 185 |
188 checkCastError(new IntCastError()); | 186 checkCastError(new IntCastError()); |
189 checkCastError(new StringCastError()); | 187 checkCastError(new StringCastError()); |
190 checkCastError(new DoubleCastError()); | 188 checkCastError(new DoubleCastError()); |
191 checkCastError(new NumCastError()); | 189 checkCastError(new NumCastError()); |
192 checkCastError(new BoolCastError()); | 190 checkCastError(new BoolCastError()); |
193 checkCastError(new FunctionCastError()); | 191 checkCastError(new FunctionCastError()); |
194 checkCastError(new MyClassCastError()); | 192 checkCastError(new MyClassCastError()); |
195 checkCastError(new ListCastError()); | 193 checkCastError(new ListCastError()); |
196 } | 194 } |
OLD | NEW |