-
Notifications
You must be signed in to change notification settings - Fork 461
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
Any ideas on testing ToLength behavior? #88
Comments
I wonder if it is okay to use the |
Thanks for the suggestion, @anba, in tc39/test262#88.
That'll do the trick for my case! Leaving open in case anyone wants to discuss other scenarios; or repo owners can close if they'd rather keep the issues list clean. |
We already test the boundaries for length in many built-in api cases, including
:) not because of this specific reason, but not a bad motivation as well. |
In ES6, array methods can operate on lengths up to 2^53 - 1, instead of 2^32 - 1. This makes writing tests hard. Consider:
all of these tests will likely take longer than the age of the universe to complete, since they are testing an algorithm that takes 2^53 iterations to reach the case we care about.
I'd be curious about other strategies I should employ instead?
The text was updated successfully, but these errors were encountered: