OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/issue12023_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__issue12023_test(exports, dart_sdk, expect) { |
| 5 'use strict'; |
| 6 const core = dart_sdk.core; |
| 7 const _interceptors = dart_sdk._interceptors; |
| 8 const dart = dart_sdk.dart; |
| 9 const dartx = dart_sdk.dartx; |
| 10 const expect$ = expect.expect; |
| 11 const issue12023_test = Object.create(null); |
| 12 let JSArrayOfString = () => (JSArrayOfString = dart.constFn(_interceptors.JSAr
ray$(core.String)))(); |
| 13 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da
rt.void, [])))(); |
| 14 issue12023_test.main = function() { |
| 15 let test = JSArrayOfString().of(["f", "5", "s", "6"]); |
| 16 let length = test[dartx.length]; |
| 17 for (let i = 0; i < dart.notNull(length);) { |
| 18 let action = test[dartx.get](i++); |
| 19 switch (action) { |
| 20 case "f": |
| 21 case "s": |
| 22 { |
| 23 action = test[dartx.get](i - 1); |
| 24 let value = core.int.parse(core.String._check(test[dartx.get](i++))); |
| 25 if (dart.equals(action, "f")) { |
| 26 expect$.Expect.equals(5, value); |
| 27 } else { |
| 28 expect$.Expect.equals(6, value); |
| 29 } |
| 30 break; |
| 31 } |
| 32 } |
| 33 } |
| 34 }; |
| 35 dart.fn(issue12023_test.main, VoidTovoid()); |
| 36 // Exports: |
| 37 exports.issue12023_test = issue12023_test; |
| 38 }); |
OLD | NEW |