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

failing test in Chrome 35 #269

Closed
Yaffle opened this issue Jul 4, 2014 · 3 comments
Closed

failing test in Chrome 35 #269

Yaffle opened this issue Jul 4, 2014 · 3 comments

Comments

@Yaffle
Copy link
Contributor

Yaffle commented Jul 4, 2014

expect(Number.isNaN(Math.clz32(undefined))).to.be.ok;

@ljharb
Copy link
Collaborator

ljharb commented Jul 4, 2014

Passes for me in Chrome 35.0.1916.153 - which version are you using exactly?

@ljharb ljharb closed this as completed Jul 4, 2014
@Yaffle
Copy link
Contributor Author

Yaffle commented Jul 5, 2014

35.0.1916.153 m, with enabled "javascript exp. features" to enable native Math.clz32
Actually, it seems, this is a wrong test:
Math.clz32(undefined) should be 32, not NaN, according to spec.
Sorry, i will not give you a link to the spec.

@ljharb
Copy link
Collaborator

ljharb commented Jul 5, 2014

https://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.clz32 says if n is 0, p will be 32, and previously, Let n be ToUint32(x), and the ToUint32 algorithm specifies If number is NaN, +0, −0, +∞, or −∞, return +0.

So, you're correct - thanks for filing and clarifying. Will fix.

@ljharb ljharb reopened this Jul 5, 2014
@ljharb ljharb closed this as completed in 687d1a4 Jul 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants