You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fa15f02
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: test/unitCases/syntax-printer.unittest.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1336,7 +1336,8 @@ const KEPT_CASES = [
1336
1336
["a function incrementing a parameter, passed the variable of its name","!function () { function show(props, name) { props.seen = name++; props.next = name; } function create(props, name, flag) { flag && show(props, name); return [props, name]; } console.log(create({}, \"a\", 1)[0].next, create({}, 1, 1)[0].next); }();"],
1337
1337
["a function writing a parameter by a pattern, passed the variable of its name","!function () { function show(props, name) { [name] = [name + \"!\"]; props.seen = name; } function create(props, name, flag) { flag && show(props, name); return [props, name]; } console.log(create({}, \"a\", 1)[0].seen, create({}, \"b\", 0)[0].seen); }();"],
1338
1338
["a function passed variables of its parameters' names, of a function reading `arguments` or `eval`","!function () { function show(props, name) { props.seen = name; } function args(props, name, flag) { flag && show(props, name); return [props, name, arguments.length]; } function evaluates(props, name, flag) { flag && show(props, name); return [props, eval(\"name\")]; } console.log(args({}, \"a\", 1)[0].seen, evaluates({}, \"b\", 1)[0].seen); }();"],
1339
-
["a function passed a global of its parameter's name","var name = \"g\"; !function () { function show(props, name) { props.seen = name; } function create(props, flag) { flag && show(props, name); return props; } console.log(create({}, 1).seen, create({}, 0).seen); }();"]
1339
+
["a function passed a global of its parameter's name","var name = \"g\"; !function () { function show(props, name) { props.seen = name; } function create(props, flag) { flag && show(props, name); return props; } console.log(create({}, 1).seen, create({}, 0).seen); }();"],
1340
+
["a function constructed as well as called, its calls not copied","!function () { var total = Number(process.argv.length > 99); function add(n) { total += n; } add(1); add(2); new add(3); console.log(total); }();"]
1340
1341
];
1341
1342
1342
1343
// An `arguments` read terser already writes right: no parameter it aliases is
0 commit comments