-
Notifications
You must be signed in to change notification settings - Fork 32
Add logic to Duration::total to handle loss of precision #622
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
Manishearth
left a comment
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.
Shouldn't be hard to just write the existing tests in Rust.
|
I have one already from another branch, but it has a bug and is creating the wrong expected value. So I need to clean it up a bit before adding it. |
5114180 to
a07f495
Compare
a07f495 to
4527b5d
Compare
|
I pushed a test that seems to work. I used the expected values from the JS tests that were failing. |
|
Ah, that will work. I was hoping to have a full version of the test262 test. But I'm not sure it's going to be possible without bringing in |
Wouldn't be a good test then IMO since that behavior itself could be buggy. |
It would be the best representation of the test262 test in Rust. But I don't necessarily disagree. In any case, we have at least a few engines running the test262 suite to help flag potential regressions. It would be nice to catch it in our tests. |
This adds the general logic from FractionToDouble to handle edge case Duration::total operations.
We still need to figure out a good way to test this in Rust, but all the Duration suite tests pass when ran locally in Boa.