A suite to track Project Diva score statistics and ratings / D4DJ event data.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
projectdivar/server/node_modules/is-float-array/test.js

20 lines
506 B

'use strict';
var a = require('assert');
var isFloat = require('./')
a.ok(isFloat(new Float64Array()))
a.ok(isFloat(new Float32Array(1)))
a.ok(!isFloat(new Uint8Array(1)))
a.ok(!isFloat(new Uint16Array(1)))
a.ok(!isFloat(new Uint32Array([0,0,0,0])))
a.ok(!isFloat(new Int8Array([0,0,0,0])))
a.ok(!isFloat(new Int16Array([0,0,0,0])))
a.ok(!isFloat(new Int32Array([0,0,0,0])))
let rand = new Array(10).fill(0).map(Math.random)
a.ok(isFloat(rand))
a.ok(!isFloat({length: 1, '0': 1 }))