-
Notifications
You must be signed in to change notification settings - Fork 28
#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
Conversation
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.
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.
I didn't check every line but the overall idea is as discussed in the other thread, so LGTM.
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.
LGTM!
@srujzs, do you have any final comments? |
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.
LGTM! Thanks for addressing the previous review comments!
Utils/expect_common.dart
Outdated
@@ -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); |
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.
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;
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.
Thank you for a very good advice, @srujzs . Updated.
Very good, thanks everybody! I'm landing this now. |
This is replacement of #3216, #3221, #3222 according to the discussion in #3222.