OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/rewrite_for_update_order_test', null, /* Imports
*/[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__rewrite_for_update_order_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 rewrite_for_update_order_test = Object.create(null); |
| 11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 12 rewrite_for_update_order_test.counter = 0; |
| 13 rewrite_for_update_order_test.global = 0; |
| 14 rewrite_for_update_order_test.test = function() { |
| 15 rewrite_for_update_order_test.counter = dart.notNull(rewrite_for_update_orde
r_test.counter) + 1; |
| 16 return dart.notNull(rewrite_for_update_order_test.counter) <= 2; |
| 17 }; |
| 18 dart.fn(rewrite_for_update_order_test.test, VoidTodynamic()); |
| 19 rewrite_for_update_order_test.first = function() { |
| 20 rewrite_for_update_order_test.global = dart.notNull(rewrite_for_update_order
_test.global) + 1; |
| 21 }; |
| 22 dart.fn(rewrite_for_update_order_test.first, VoidTodynamic()); |
| 23 rewrite_for_update_order_test.second = function() { |
| 24 rewrite_for_update_order_test.global = dart.notNull(rewrite_for_update_order
_test.global) * 2; |
| 25 }; |
| 26 dart.fn(rewrite_for_update_order_test.second, VoidTodynamic()); |
| 27 rewrite_for_update_order_test.foo = function() { |
| 28 while (dart.test(rewrite_for_update_order_test.test())) { |
| 29 rewrite_for_update_order_test.first(); |
| 30 rewrite_for_update_order_test.second(); |
| 31 } |
| 32 }; |
| 33 dart.fn(rewrite_for_update_order_test.foo, VoidTodynamic()); |
| 34 rewrite_for_update_order_test.main = function() { |
| 35 rewrite_for_update_order_test.foo(); |
| 36 expect$.Expect.equals(6, rewrite_for_update_order_test.global); |
| 37 }; |
| 38 dart.fn(rewrite_for_update_order_test.main, VoidTodynamic()); |
| 39 // Exports: |
| 40 exports.rewrite_for_update_order_test = rewrite_for_update_order_test; |
| 41 }); |
OLD | NEW |