| 3 | var ValidationError = asm.ValidationError; |
| 4 | |
| 5 | function explode(test) { |
| 6 | var __EMPTY__ = []; |
| 7 | var __PURE__ = ["var imul = stdlib.Math.imul, sin = stdlib.Math.sin;"]; |
| 8 | var __ALL__ = __PURE__.concat(["var H32 = new stdlib.Int32Array(heap), HU32 = new stdlib.Uint32Array(heap), HF64 = new stdlib.Float64Array(heap);"]); |
| 9 | |
| 10 | var SEP = "\n "; |
| 11 | |
| 12 | return String(test).replace("__EMPTY__", __EMPTY__.join(SEP)) |
| 13 | .replace("__PURE__", __PURE__.join(SEP)) |
| 14 | .replace("__ALL__", __ALL__.join(SEP)); |
| 15 | } |
| 16 | |
| 17 | function asmAssert(msg, f, expect) { |
| 18 | f = explode(f); |