Skip to content
Snippets Groups Projects
Commit f0ac90a5 authored by André Bargull's avatar André Bargull
Browse files

Move tests to Math.clz32 (Fixes #41)

Number.prototype.clz() was renamed to Math.clz32(). Also removed superfluous 'spec' entry in test descriptor.
parent 64756c25
No related branches found
No related tags found
No related merge requests found
...@@ -7,13 +7,12 @@ ...@@ -7,13 +7,12 @@
/*--- /*---
author: Ryan Lewis author: Ryan Lewis
email: ryanhlewis@hotmail.com email: ryanhlewis@hotmail.com
spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.prototype.clz" description: Math.clz32 should return 32 if passed 0.
description: Number.prototype.clz should return 32 if passed 0.
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
if(Number.prototype.clz(0) === 32) { if(Math.clz32(0) === 32) {
return true; return true;
} }
} }
......
...@@ -7,13 +7,12 @@ ...@@ -7,13 +7,12 @@
/*--- /*---
author: Ryan Lewis author: Ryan Lewis
email: ryanhlewis@hotmail.com email: ryanhlewis@hotmail.com
spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.prototype.clz" description: Math.clz32 should return 31 if passed 1.
description: Number.prototype.clz should return 31 if passed 1.
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
if(Number.prototype.clz(1) === 31) { if(Math.clz32(1) === 31) {
return true; return true;
} }
} }
......
...@@ -7,13 +7,12 @@ ...@@ -7,13 +7,12 @@
/*--- /*---
author: Ryan Lewis author: Ryan Lewis
email: ryanhlewis@hotmail.com email: ryanhlewis@hotmail.com
spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.prototype.clz" description: Math.clz32 should return 0 if passed 2147483648
description: Number.prototype.clz should return 0 if passed 2147483648
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
if(Number.prototype.clz(2147483648) === 0) { if(Math.clz32(2147483648) === 0) {
return true; return true;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment