-
Notifications
You must be signed in to change notification settings - Fork 480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor misc. statement tests for parsers #2117
Refactor misc. statement tests for parsers #2117
Conversation
The tests for the parsing of various statement were expressed using eval. This made the tests more complex than necessary and also prevented the tests from providing value to ECMAScript parsers. Remove the use of eval and instead express the expectations with literal source text. Rename the files to make each test's purpose more clear.
Previously, some tests verified two independent concerns simultaneously: syntactic validity and runtime completion value. The former is relevant for ECMAScript runtimes and parsers alike, but the latter is only observable by runtimes. Express expectations regarding syntactic validity using literal program code so they can be used by parsers. Maintain the original tests which rely on eval in order to preserve coverage for statement completion values.
@isiahmeadows I didn't touch a handful of tests from your report in gh-1356:
These tests concern statement completion values, so their use of |
Okay. FWIW, I didn't even really create 99% of those tests - I just wrapped
them such that they could be used in other places.
…On Mon, Apr 1, 2019 at 10:30 jugglinmike ***@***.***> wrote:
@isiahmeadows <https://github.com/isiahmeadows> I didn't touch a handful
of tests from your report in gh-1356
<#1356>:
- test/language/statements/do-while/S12.6.1_A5.js
- test/language/statements/do-while/S12.6.1_A8.js
- test/language/statements/for-in/S12.6.4_A3.1.js
- test/language/statements/for-in/S12.6.4_A3.js
- test/language/statements/for-in/S12.6.4_A4.1.js
- test/language/statements/for-in/S12.6.4_A4.js
- test/language/statements/while/S12.6.2_A8.js
These tests concern statement completion values, so their use of eval is
unavoidable. I was tempted to create corresponding syntax tests, but since
they don't describe particularly interesting edge-cases, I decided to skip
that.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2117 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AERrBAPKe4-UOQdKi5ItGZSW0Ra_IB33ks5vchfsgaJpZM4cV2x1>
.
|
break | ||
FOR1; | ||
} while(0); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JS can be so beautiful!
description: Using eval | ||
---*/ | ||
|
||
var supreme, count; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The supreme count of JS.
This is in service of gh-1356.