Skip to content
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

improve our test Utils a bit and use it at more places #1666

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

rbri
Copy link
Collaborator

@rbri rbri commented Oct 1, 2024

No description provided.

Copy link
Contributor

@rPraml rPraml left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

assertEquals(expected, res);
return null;
});
assertWithAllOptimizationLevels(-1, expected, script);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use the constant VERSION_UNKNOWN (or VERSION_DEFAULT) here?

Suggested change
assertWithAllOptimizationLevels(-1, expected, script);
assertWithAllOptimizationLevels(Context.VERSION_UNKNOWN, expected, script);

runWithAllOptimizationLevels(
cx -> {
cx.setLanguageVersion(Context.VERSION_ES6);
if (languageVersion > -1) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, -1 does mean "do not change version" here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes maybe i have to add some comment....

@gbrail
Copy link
Collaborator

gbrail commented Oct 1, 2024

Cool -- thanks!

@gbrail gbrail merged commit adfc786 into mozilla:master Oct 1, 2024
1 check passed
@rbri rbri deleted the improved_test_utils branch October 2, 2024 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants