summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/pipeline/evaluation-order.js
blob: 642ad78f550de499894adcdf00449fe80a5bf4c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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);