Skip to content
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

Closed
wants to merge 2 commits into from
Closed

Math tests from https://github.com/mozilla/mozilla-central #85

wants to merge 2 commits into from

Conversation

Yaffle
Copy link
Contributor

@Yaffle Yaffle commented Jul 18, 2013

No description provided.

@paulmillr
Copy link
Owner

I suppose all of them are failing. Right?

@Yaffle
Copy link
Contributor Author

Yaffle commented Jul 18, 2013

no, 2435 passes, 166 failures in Chrome and Firefox

@Yaffle
Copy link
Contributor Author

Yaffle commented Jul 18, 2013

after applyling fixes for Math.trunc and Math.hypot - #35 (comment) - 153 failures

@paulmillr
Copy link
Owner

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
Copy link
Collaborator

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.

@ljharb
Copy link
Collaborator

ljharb commented Jul 18, 2013

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.

@Yaffle
Copy link
Contributor Author

Yaffle commented Jul 18, 2013

@ljharb, but do we trying to reduce this difference or not?
they all from the spec
assertNear is used for many tests instead of asssertEq similar to almostEqual in chai...

@ljharb
Copy link
Collaborator

ljharb commented Jul 18, 2013

@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.

@Yaffle
Copy link
Contributor Author

Yaffle commented Jul 24, 2013

@ljharb, please take a look at tests - there is only math, nothing engine-specific, excepp Number.MIN_VALUE

@ljharb
Copy link
Collaborator

ljharb commented Jul 25, 2013

@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.

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

Successfully merging this pull request may close these issues.

3 participants