-
Notifications
You must be signed in to change notification settings - Fork 388
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
Math tests from https://github.com/mozilla/mozilla-central #85
Conversation
I suppose all of them are failing. Right? |
no, 2435 passes, 166 failures in Chrome and Firefox |
after applyling fixes for Math.trunc and Math.hypot - #35 (comment) - 153 failures |
okay then, let’s leave this opened and incrementally improve shim to make all tests pass |
assertEq(Math.sign(-Number.MAX_VALUE), -1); | ||
assertEq(Math.sign(-Infinity), -1); | ||
|
||
for (var i = -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.
please add a trailing newline - omitting one screws with many unix tools, including git diff.
How many of these tests are in the spec? We should only include tests that are in the ES6 spec - not just tests that a given ES implementation uses - as the behavior will differ between V8, SpiderMonkey, Trident, Blink, etc. |
@ljharb, but do we trying to reduce this difference or not? |
@Yaffle the spec is not very specific on many things - please go take a look at it. There is a danger from over-specifying standard methods, and we shouldn't prefer one engine over any other, or else people won't want to use es6-shim across multiple engines. If the spec allows for deviation, and V8 deviates much more than mozilla, they're both correct - so a test would be meaningless. |
@ljharb, please take a look at tests - there is only math, nothing engine-specific, excepp Number.MIN_VALUE |
@Yaffle if the values aren't specified in the spec, they're potentially engine-specific. Sanity checking is awesome - we just need to be careful that tests aren't too precise, because if it's not spec'd, there is no right answer. |
No description provided.