Closed Bug 1313490 Opened 3 years ago Closed 3 years ago

Remove expression closures from our tests

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: evilpie, Assigned: arai)

References

Details

Attachments

(3 files)

Before we can disable expression closures in Nightly we have to first remove all uses of expression closures from our JS tests. (Of course unless we actually *want* to test expression closures in a test)
Blocks: 1319512
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Changed to function expression or arrow function in tests that doesn't test parser.
Attachment #8813500 - Flags: review?(evilpies)
same for jstests
Attachment #8813501 - Flags: review?(evilpies)
expression closure is used to test warning there.
we can use "statement after return" instead.
Attachment #8813504 - Flags: review?(mrbkap)
Comment on attachment 8813500 [details] [diff] [review]
Part 1: Remove unnecessary expression closure from jit-test.

Review of attachment 8813500 [details] [diff] [review]:
-----------------------------------------------------------------

There a bunch more cases where `return` would be unnecessary, but considering that most tests look like fuzz tests anyway we can just preserve the current behavior more closely.

::: js/src/jit-test/tests/arguments/defaults-destructuring-expression-closure.js
@@ +2,5 @@
> +  return (
> +    assertEq(a, 1),
> +    assertEq(b, bIs),
> +    assertEq(c, cIs),
> +    assertEq(d, dIs)

Remove the return and () around the asserts.

::: js/src/jit-test/tests/baseline/bug852801.js
@@ -13,5 @@
>      for (var i=0; i<lines.length; i++)
>  	print (STATUS + lines[i]);
>  }
>  function printBugNumber (num) {}
> -function toPrinted(value)

That was confusing
Attachment #8813500 - Flags: review?(evilpies) → review+
Attachment #8813501 - Flags: review?(evilpies) → review+
Attachment #8813504 - Flags: review?(mrbkap) → review+
https://hg.mozilla.org/mozilla-central/rev/8aee096b3c4b
https://hg.mozilla.org/mozilla-central/rev/64a9c8f9d503
https://hg.mozilla.org/mozilla-central/rev/349bfd47d48b
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.