Skip to content

#3180. Simplify JSAnyOperation tests. #3223

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

Merged
merged 5 commits into from
Jun 16, 2025
Merged

Conversation

sgrekhov
Copy link
Contributor

This is replacement of #3216, #3221, #3222 according to the discussion in #3222.

@sgrekhov sgrekhov requested review from osa1, eernstg and srujzs June 12, 2025 14:23
Copy link
Member

@eernstg eernstg left a comment

Choose a reason for hiding this comment

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

LGTM, awaiting input from @osa1 and @srujzs.

Copy link
Member

@osa1 osa1 left a comment

Choose a reason for hiding this comment

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

I didn't check every line but the overall idea is as discussed in the other thread, so LGTM.

@sgrekhov sgrekhov requested a review from eernstg June 13, 2025 12:39
Copy link
Member

@eernstg eernstg left a comment

Choose a reason for hiding this comment

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

LGTM!

@eernstg
Copy link
Member

eernstg commented Jun 13, 2025

@srujzs, do you have any final comments?

Copy link

@srujzs srujzs left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for addressing the previous review comments!

@@ -401,7 +401,10 @@ final bool assertStatementsEnabled = (() {
})();

/// Is true iff js compiler is used
final bool isJS = identical(1.0, 1);
const bool isJS = identical(1.0, 1);
Copy link

Choose a reason for hiding this comment

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

nit: For a general purpose check, check these. I believe the common advice is to check the specific semantic differences you care about for a test, but for a general purpose check, this is likely cleaner.

const bool isDDC = const bool.fromEnvironment('dart.library._ddc_only');
const bool isDart2JS = const bool.fromEnvironment('dart.tool.dart2js');
const bool isJS = isDart2JS || isDDC;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for a very good advice, @srujzs . Updated.

@eernstg
Copy link
Member

eernstg commented Jun 16, 2025

Very good, thanks everybody! I'm landing this now.

@eernstg eernstg merged commit 3c3e258 into dart-lang:master Jun 16, 2025
2 checks passed
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.

4 participants