diff options
Diffstat (limited to 'js/src/tests/non262/pipeline/evaluation-order.js')
-rw-r--r-- | js/src/tests/non262/pipeline/evaluation-order.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/js/src/tests/non262/pipeline/evaluation-order.js b/js/src/tests/non262/pipeline/evaluation-order.js new file mode 100644 index 0000000000..642ad78f55 --- /dev/null +++ b/js/src/tests/non262/pipeline/evaluation-order.js @@ -0,0 +1,18 @@ +const BUGNUMBER = 1405943; +const summary = "Implement pipeline operator (evaluation order)"; + +print(BUGNUMBER + ": " + summary); + +if (hasPipeline()) { + eval(` + // It tests evaluation order. + // Considering the expression A |> B, A should be evaluated before B. + let value = null; + const result = (value = 10, "42") |> (value = 20, parseInt); + assertEq(result, 42); + assertEq(value, 20); + `); +} + +if (typeof reportCompare === "function") + reportCompare(0, 0); |