diff options
Diffstat (limited to 'js/src/tests/non262/pipeline/parse-error.js')
-rw-r--r-- | js/src/tests/non262/pipeline/parse-error.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/js/src/tests/non262/pipeline/parse-error.js b/js/src/tests/non262/pipeline/parse-error.js new file mode 100644 index 0000000000..ce191651f7 --- /dev/null +++ b/js/src/tests/non262/pipeline/parse-error.js @@ -0,0 +1,18 @@ +const BUGNUMBER = 1405943; +const summary = "Implement pipeline operator (parse error)"; + +print(BUGNUMBER + ": " + summary); + +if (hasPipeline()) { + // Invalid Token + assertThrowsInstanceOf(() => Function("2 | > parseInt"), SyntaxError); + assertThrowsInstanceOf(() => Function("2 ||> parseInt"), SyntaxError); + assertThrowsInstanceOf(() => Function("2 |>> parseInt"), SyntaxError); + assertThrowsInstanceOf(() => Function("2 <| parseInt"), SyntaxError); + // Invalid Syntax + assertThrowsInstanceOf(() => Function("2 |>"), SyntaxError); + assertThrowsInstanceOf(() => Function("|> parseInt"), SyntaxError); +} + +if (typeof reportCompare === "function") + reportCompare(0, 0); |