OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/try_catch4_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__try_catch4_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 try_catch4_test = Object.create(null); |
| 11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 12 try_catch4_test.a = null; |
| 13 try_catch4_test.foo1 = function() { |
| 14 let b = false; |
| 15 let entered = false; |
| 16 while (true) { |
| 17 if (entered) return b; |
| 18 b = dart.equals(8, try_catch4_test.a); |
| 19 try { |
| 20 try_catch4_test.a = 8; |
| 21 return; |
| 22 } finally { |
| 23 b = dart.equals(8, try_catch4_test.a); |
| 24 entered = true; |
| 25 continue; |
| 26 } |
| 27 } |
| 28 }; |
| 29 dart.fn(try_catch4_test.foo1, VoidTodynamic()); |
| 30 try_catch4_test.doThrow = function() { |
| 31 dart.throw(2); |
| 32 }; |
| 33 dart.fn(try_catch4_test.doThrow, VoidTodynamic()); |
| 34 try_catch4_test.foo2 = function() { |
| 35 let b = false; |
| 36 let entered = false; |
| 37 while (true) { |
| 38 if (entered) return b; |
| 39 b = dart.equals(8, try_catch4_test.a); |
| 40 try { |
| 41 try_catch4_test.a = 8; |
| 42 try_catch4_test.doThrow(); |
| 43 return; |
| 44 } catch (e) { |
| 45 b = dart.equals(8, try_catch4_test.a); |
| 46 entered = true; |
| 47 continue; |
| 48 } |
| 49 |
| 50 } |
| 51 }; |
| 52 dart.fn(try_catch4_test.foo2, VoidTodynamic()); |
| 53 try_catch4_test.foo3 = function() { |
| 54 let b = false; |
| 55 let entered = false; |
| 56 while (true) { |
| 57 if (entered) return b; |
| 58 b = dart.equals(8, try_catch4_test.a); |
| 59 try { |
| 60 try_catch4_test.doThrow(); |
| 61 } catch (e) { |
| 62 try_catch4_test.a = 8; |
| 63 entered = true; |
| 64 return; |
| 65 } |
| 66 finally { |
| 67 b = dart.equals(8, try_catch4_test.a); |
| 68 entered = true; |
| 69 continue; |
| 70 } |
| 71 } |
| 72 }; |
| 73 dart.fn(try_catch4_test.foo3, VoidTodynamic()); |
| 74 try_catch4_test.foo4 = function() { |
| 75 let b = false; |
| 76 let entered = false; |
| 77 while (true) { |
| 78 if (entered) return b; |
| 79 b = dart.equals(8, try_catch4_test.a); |
| 80 try { |
| 81 try_catch4_test.a = 8; |
| 82 break; |
| 83 } finally { |
| 84 b = dart.equals(8, try_catch4_test.a); |
| 85 entered = true; |
| 86 continue; |
| 87 } |
| 88 } |
| 89 }; |
| 90 dart.fn(try_catch4_test.foo4, VoidTodynamic()); |
| 91 try_catch4_test.foo5 = function() { |
| 92 let b = false; |
| 93 let entered = false; |
| 94 while (true) { |
| 95 if (entered) return b; |
| 96 b = dart.equals(8, try_catch4_test.a); |
| 97 try { |
| 98 try_catch4_test.a = 8; |
| 99 try_catch4_test.doThrow(); |
| 100 break; |
| 101 } catch (e) { |
| 102 b = dart.equals(8, try_catch4_test.a); |
| 103 entered = true; |
| 104 continue; |
| 105 } |
| 106 |
| 107 } |
| 108 }; |
| 109 dart.fn(try_catch4_test.foo5, VoidTodynamic()); |
| 110 try_catch4_test.foo6 = function() { |
| 111 let b = false; |
| 112 let entered = false; |
| 113 while (true) { |
| 114 if (entered) return b; |
| 115 b = dart.equals(8, try_catch4_test.a); |
| 116 try { |
| 117 try_catch4_test.doThrow(); |
| 118 } catch (e) { |
| 119 try_catch4_test.a = 8; |
| 120 entered = true; |
| 121 break; |
| 122 } |
| 123 finally { |
| 124 b = dart.equals(8, try_catch4_test.a); |
| 125 entered = true; |
| 126 continue; |
| 127 } |
| 128 } |
| 129 }; |
| 130 dart.fn(try_catch4_test.foo6, VoidTodynamic()); |
| 131 try_catch4_test.foo7 = function() { |
| 132 let b = false; |
| 133 let entered = false; |
| 134 while (true) { |
| 135 if (entered) return b; |
| 136 b = dart.equals(8, try_catch4_test.a); |
| 137 try { |
| 138 try_catch4_test.a = 8; |
| 139 continue; |
| 140 } finally { |
| 141 b = dart.equals(8, try_catch4_test.a); |
| 142 entered = true; |
| 143 continue; |
| 144 } |
| 145 } |
| 146 }; |
| 147 dart.fn(try_catch4_test.foo7, VoidTodynamic()); |
| 148 try_catch4_test.foo8 = function() { |
| 149 let b = false; |
| 150 let entered = false; |
| 151 while (true) { |
| 152 if (entered) return b; |
| 153 b = dart.equals(8, try_catch4_test.a); |
| 154 try { |
| 155 try_catch4_test.a = 8; |
| 156 try_catch4_test.doThrow(); |
| 157 continue; |
| 158 } catch (e) { |
| 159 b = dart.equals(8, try_catch4_test.a); |
| 160 entered = true; |
| 161 continue; |
| 162 } |
| 163 |
| 164 } |
| 165 }; |
| 166 dart.fn(try_catch4_test.foo8, VoidTodynamic()); |
| 167 try_catch4_test.foo9 = function() { |
| 168 let b = false; |
| 169 let entered = false; |
| 170 while (true) { |
| 171 if (entered) return b; |
| 172 b = dart.equals(8, try_catch4_test.a); |
| 173 try { |
| 174 try_catch4_test.doThrow(); |
| 175 } catch (e) { |
| 176 try_catch4_test.a = 8; |
| 177 entered = true; |
| 178 continue; |
| 179 } |
| 180 finally { |
| 181 b = dart.equals(8, try_catch4_test.a); |
| 182 entered = true; |
| 183 continue; |
| 184 } |
| 185 } |
| 186 }; |
| 187 dart.fn(try_catch4_test.foo9, VoidTodynamic()); |
| 188 try_catch4_test.main_test = function() { |
| 189 try_catch4_test.a = 0; |
| 190 expect$.Expect.isTrue(try_catch4_test.foo1()); |
| 191 try_catch4_test.a = 0; |
| 192 expect$.Expect.isTrue(try_catch4_test.foo2()); |
| 193 try_catch4_test.a = 0; |
| 194 expect$.Expect.isTrue(try_catch4_test.foo3()); |
| 195 try_catch4_test.a = 0; |
| 196 expect$.Expect.isTrue(try_catch4_test.foo4()); |
| 197 try_catch4_test.a = 0; |
| 198 expect$.Expect.isTrue(try_catch4_test.foo5()); |
| 199 try_catch4_test.a = 0; |
| 200 expect$.Expect.isTrue(try_catch4_test.foo6()); |
| 201 try_catch4_test.a = 0; |
| 202 expect$.Expect.isTrue(try_catch4_test.foo7()); |
| 203 try_catch4_test.a = 0; |
| 204 expect$.Expect.isTrue(try_catch4_test.foo8()); |
| 205 try_catch4_test.a = 0; |
| 206 expect$.Expect.isTrue(try_catch4_test.foo9()); |
| 207 }; |
| 208 dart.fn(try_catch4_test.main_test, VoidTodynamic()); |
| 209 try_catch4_test.main = function() { |
| 210 for (let i = 0; i < 20; i++) { |
| 211 try_catch4_test.main_test(); |
| 212 } |
| 213 }; |
| 214 dart.fn(try_catch4_test.main, VoidTodynamic()); |
| 215 // Exports: |
| 216 exports.try_catch4_test = try_catch4_test; |
| 217 }); |
OLD | NEW |