X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/2d39b0e377c0896910ee49ae70082ba665faf986..ed1e77d3adeb83d26fd1dfb16dd84cabdcefd250:/tests/stress/disable-function-dot-arguments.js diff --git a/tests/stress/disable-function-dot-arguments.js b/tests/stress/disable-function-dot-arguments.js new file mode 100644 index 0000000..ba94fc3 --- /dev/null +++ b/tests/stress/disable-function-dot-arguments.js @@ -0,0 +1,20 @@ +//@ run("function-dot-arguments", "--enableFunctionDotArguments=false") + +function foo() { + var a = bar.arguments; + if (a.length != 0) + throw "Error: arguments have non-zero length"; + for (var i = 0; i < 100; ++i) { + if (a[i] !== void 0) + throw "Error: argument " + i + " has non-undefined value"; + } +} + +function bar() { + foo(); +} + +bar(); +bar(1); +bar(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); +