OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/throw8_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__throw8_test(exports, dart_sdk, expect) { |
| 5 'use strict'; |
| 6 const core = dart_sdk.core; |
| 7 const dart = dart_sdk.dart; |
| 8 const dartx = dart_sdk.dartx; |
| 9 const expect$ = expect.expect; |
| 10 const throw8_test = Object.create(null); |
| 11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 12 throw8_test.finallyExecutionCount = 0; |
| 13 throw8_test.bar = function() { |
| 14 try { |
| 15 try { |
| 16 return 499; |
| 17 } catch (e) { |
| 18 let st = dart.stackTrace(e); |
| 19 throw e; |
| 20 } |
| 21 |
| 22 } finally { |
| 23 throw8_test.finallyExecutionCount = dart.notNull(throw8_test.finallyExecut
ionCount) + 1; |
| 24 dart.throw("quit finally with throw"); |
| 25 } |
| 26 }; |
| 27 dart.fn(throw8_test.bar, VoidTodynamic()); |
| 28 throw8_test.main = function() { |
| 29 let hasThrown = false; |
| 30 try { |
| 31 throw8_test.bar(); |
| 32 } catch (x) { |
| 33 hasThrown = true; |
| 34 expect$.Expect.equals(1, throw8_test.finallyExecutionCount); |
| 35 } |
| 36 |
| 37 expect$.Expect.isTrue(hasThrown); |
| 38 }; |
| 39 dart.fn(throw8_test.main, VoidTodynamic()); |
| 40 // Exports: |
| 41 exports.throw8_test = throw8_test; |
| 42 }); |
OLD | NEW |