OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/execute_finally10_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__execute_finally10_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 execute_finally10_test = Object.create(null); |
| 11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 12 execute_finally10_test.A = class A extends core.Object { |
| 13 new() { |
| 14 this.field = null; |
| 15 } |
| 16 start() {} |
| 17 stop() { |
| 18 this.field = 42; |
| 19 } |
| 20 }; |
| 21 dart.setSignature(execute_finally10_test.A, { |
| 22 methods: () => ({ |
| 23 start: dart.definiteFunctionType(dart.dynamic, []), |
| 24 stop: dart.definiteFunctionType(dart.dynamic, []) |
| 25 }) |
| 26 }); |
| 27 execute_finally10_test.B = class B extends core.Object { |
| 28 new() { |
| 29 this.totalCompileTime = new execute_finally10_test.A(); |
| 30 this.runCompiler = new core.Object(); |
| 31 } |
| 32 run() { |
| 33 this.totalCompileTime.start(); |
| 34 try { |
| 35 dart.throw('foo'); |
| 36 } catch (exception) { |
| 37 dart.toString(this.runCompiler); |
| 38 dart.toString(this.runCompiler); |
| 39 throw exception; |
| 40 } |
| 41 finally { |
| 42 this.totalCompileTime.stop(); |
| 43 } |
| 44 } |
| 45 }; |
| 46 dart.setSignature(execute_finally10_test.B, { |
| 47 methods: () => ({run: dart.definiteFunctionType(dart.dynamic, [])}) |
| 48 }); |
| 49 execute_finally10_test.main = function() { |
| 50 let b = new execute_finally10_test.B(); |
| 51 try { |
| 52 b.run(); |
| 53 dart.throw('Expected exception'); |
| 54 } catch (exception) { |
| 55 } |
| 56 |
| 57 expect$.Expect.equals(42, b.totalCompileTime.field); |
| 58 }; |
| 59 dart.fn(execute_finally10_test.main, VoidTodynamic()); |
| 60 // Exports: |
| 61 exports.execute_finally10_test = execute_finally10_test; |
| 62 }); |
OLD | NEW |