Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

there should be a TypedArrayMethods test #3

Open
allenwb opened this issue May 7, 2015 · 8 comments
Open

there should be a TypedArrayMethods test #3

allenwb opened this issue May 7, 2015 · 8 comments
Assignees

Comments

@allenwb
Copy link

allenwb commented May 7, 2015

To test that the specified Array.prototype methods have been made available on %TypedArray%.prototyipe

@getify
Copy link
Owner

getify commented May 8, 2015

Agreed.

If you can short-circuit my research on this, are there any exceptions (like some methods that are not, or some TypedArray's that don't)?

@getify getify self-assigned this May 8, 2015
@allenwb
Copy link
Author

allenwb commented May 8, 2015

The only methods excluded from Array.prototype of those that change the length of the array:
concat, pop, push, shift, splice, unshift

all methods are available on all typed arrays

@getify
Copy link
Owner

getify commented May 8, 2015

Thanks!

@getify
Copy link
Owner

getify commented May 8, 2015

clarification: concat(..) isn't a mutator, so it's safe, right? Does it get on the TypedArray prototypes?

@allenwb
Copy link
Author

allenwb commented May 8, 2015

right concat isn't a mutator, but it was also excluded because it would be hard to reliably precompute the fixed size of the result typed array object.

Another feature point is the availability of from and of on the typed array constructors.

getify added a commit that referenced this issue May 8, 2015
@getify
Copy link
Owner

getify commented May 8, 2015

@allenwb
Copy link
Author

allenwb commented May 8, 2015

Looks good, I might also test for 'sort' just because it is one of the more interesting methods and requires more implementation work than just moving over the Array.prototype method

@getify
Copy link
Owner

getify commented May 8, 2015

thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants