-
Notifications
You must be signed in to change notification settings - Fork 29
#3180. Add tests for JSDataViewToByteData
and ByteDataToJSDataView
#3312
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
base: master
Are you sure you want to change the base?
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.
LGTM, awaiting further input!
/// > [JSDataView] and vice versa unless it was instantiated in JavaScript. | ||
/// | ||
/// @description Check that on `dart2wasm` if [ByteBuffer] was instantiated in | ||
/// JavaScript then this operations unwraps it and therefore changes in the |
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.
Typo:
/// JavaScript then this operations unwraps it and therefore changes in the | |
/// JavaScript then this operation unwraps it. Hence, changes in the |
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. Fixed.
/// versa. | ||
/// | ||
/// @description Check that this getter converts this [JSDataView] to a | ||
/// [ByteData]. Test [JSDataView] created in JavaScript. |
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.
Just a nit: This also tests that the original DataView is modified when modifying the ByteData.
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.
Comment updated.
/// Modifications to this [JSDataView] will affect the [ByteData] and vice | ||
/// versa. | ||
/// | ||
/// @description Check that in case of `dart2js` this operation is a cast and |
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.
Should we check this isn't the case in dart2wasm
?
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.
At first I didn't add this because it isn't said that wrapping/unwrapping operation cannot return the same object. But in our meeting this morning, @eernstg convinced me that it's important for users to know that these are distinct objects. Updated.
/// Modifications to this [JSDataView] will affect the [ByteData] and vice | ||
/// versa. | ||
/// | ||
/// @description Check that this getter converts this [JSDataView] to a |
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.
Same comment as above.
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.
Updated.
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.
Updated. Please take another look.
/// > [JSDataView] and vice versa unless it was instantiated in JavaScript. | ||
/// | ||
/// @description Check that on `dart2wasm` if [ByteBuffer] was instantiated in | ||
/// JavaScript then this operations unwraps it and therefore changes in the |
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. Fixed.
/// Modifications to this [JSDataView] will affect the [ByteData] and vice | ||
/// versa. | ||
/// | ||
/// @description Check that in case of `dart2js` this operation is a cast and |
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.
At first I didn't add this because it isn't said that wrapping/unwrapping operation cannot return the same object. But in our meeting this morning, @eernstg convinced me that it's important for users to know that these are distinct objects. Updated.
/// versa. | ||
/// | ||
/// @description Check that this getter converts this [JSDataView] to a | ||
/// [ByteData]. Test [JSDataView] created in JavaScript. |
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.
Comment updated.
/// Modifications to this [JSDataView] will affect the [ByteData] and vice | ||
/// versa. | ||
/// | ||
/// @description Check that this getter converts this [JSDataView] to a |
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.
Updated.
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!
No description provided.