From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- js/src/tests/non262/reflect-parse/argumentsReflect.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 js/src/tests/non262/reflect-parse/argumentsReflect.js (limited to 'js/src/tests/non262/reflect-parse') diff --git a/js/src/tests/non262/reflect-parse/argumentsReflect.js b/js/src/tests/non262/reflect-parse/argumentsReflect.js new file mode 100644 index 0000000000..69a8624acc --- /dev/null +++ b/js/src/tests/non262/reflect-parse/argumentsReflect.js @@ -0,0 +1,14 @@ +// |reftest| skip-if(!xulRuntime.shell) + +// Test reflect.parse on a function with arguments.length +let ast = Reflect.parse(`function f10() { + return arguments.length; +}`); + +assertEq(ast.body[0].body.body[0].argument.object.type, "Identifier"); +assertEq(ast.body[0].body.body[0].argument.object.name, "arguments"); +assertEq(ast.body[0].body.body[0].argument.property.type, "Identifier"); +assertEq(ast.body[0].body.body[0].argument.property.name, "length"); + +if (typeof reportCompare === "function") + reportCompare(0, 0, "ok"); -- cgit v1.2.3