| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 library exception_implementation_test; | |
| 6 | |
| 7 import "package:expect/expect.dart"; | |
| 8 | |
| 9 main() { | |
| 10 final msg = 1; | |
| 11 try { | |
| 12 throw new Exception(msg); | |
| 13 Expect.fail("Unreachable"); | |
| 14 } on Exception catch (e) { | |
| 15 Expect.isTrue(e is Exception); | |
| 16 Expect.equals("Exception: $msg", e.toString()); | |
| 17 } | |
| 18 } | |
| OLD | NEW |