Merge pull request #79 from anba/issue-41/move-clz-to-math

Move tests to Math.clz32 (Fixes #41)
This commit is contained in:
Brian Terlson 2014-08-05 23:50:05 -07:00
commit f04573e583
3 changed files with 6 additions and 9 deletions

View File

@ -7,13 +7,12 @@
/*---
author: Ryan Lewis
email: ryanhlewis@hotmail.com
spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.prototype.clz"
description: Number.prototype.clz should return 32 if passed 0.
description: Math.clz32 should return 32 if passed 0.
includes: [runTestCase.js]
---*/
function testcase() {
if(Number.prototype.clz(0) === 32) {
if(Math.clz32(0) === 32) {
return true;
}
}

View File

@ -7,13 +7,12 @@
/*---
author: Ryan Lewis
email: ryanhlewis@hotmail.com
spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.prototype.clz"
description: Number.prototype.clz should return 31 if passed 1.
description: Math.clz32 should return 31 if passed 1.
includes: [runTestCase.js]
---*/
function testcase() {
if(Number.prototype.clz(1) === 31) {
if(Math.clz32(1) === 31) {
return true;
}
}

View File

@ -7,13 +7,12 @@
/*---
author: Ryan Lewis
email: ryanhlewis@hotmail.com
spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.prototype.clz"
description: Number.prototype.clz should return 0 if passed 2147483648
description: Math.clz32 should return 0 if passed 2147483648
includes: [runTestCase.js]
---*/
function testcase() {
if(Number.prototype.clz(2147483648) === 0) {
if(Math.clz32(2147483648) === 0) {
return true;
}
}