| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 // VMOptions=--error_on_bad_type --error_on_bad_override | 4 // VMOptions=--error_on_bad_type --error_on_bad_override |
| 5 | 5 |
| 6 import 'package:observatory/service_io.dart'; | 6 import 'package:observatory/service_io.dart'; |
| 7 import 'package:unittest/unittest.dart'; | 7 import 'package:unittest/unittest.dart'; |
| 8 import 'test_helper.dart'; | 8 import 'test_helper.dart'; |
| 9 import 'dart:async'; | 9 import 'dart:async'; |
| 10 | 10 |
| 11 doThrow() { | 11 doThrow() { |
| 12 throw "TheException"; // Line 13. | 12 throw "TheException"; // Line 13. |
| 13 return "end of doThrow"; | |
| 14 } | 13 } |
| 15 | 14 |
| 16 doCaught() { | 15 doCaught() { |
| 17 try { | 16 try { |
| 18 doThrow(); | 17 doThrow(); |
| 19 } catch (e) {} | 18 } catch (e) {} |
| 20 return "end of doCaught"; | 19 return "end of doCaught"; |
| 21 } | 20 } |
| 22 | 21 |
| 23 doUncaught() { | 22 doUncaught() { |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 101 |
| 103 await test("None", "doCaught()", false, true); | 102 await test("None", "doCaught()", false, true); |
| 104 await test("None", "doUncaught()", false, false); | 103 await test("None", "doUncaught()", false, false); |
| 105 | 104 |
| 106 subscription.cancel(); | 105 subscription.cancel(); |
| 107 }, | 106 }, |
| 108 | 107 |
| 109 ]; | 108 ]; |
| 110 | 109 |
| 111 main(args) => runIsolateTests(args, tests); | 110 main(args) => runIsolateTests(args, tests); |
| OLD | NEW |