UNPKG

aureooms-js-number

Version:

Primitive number type arithmetic for JavaScript

28 lines (21 loc) 603 B
import test from 'ava' ; import * as number from '../../../src' ; test( "ge", t => { const one = function ( a , b ) { t.deepEqual ( number . ge ( a , b ) , a >= b , a + " >= " + b ) ; } ; const n = 10 ; for ( let i = 0 ; i < n ; ++i ) { const a = Math . random ( ) ; const b = Math . random ( ) ; one ( a , b ) ; } one ( Infinity , Infinity ) ; one ( Infinity , 0 ) ; one ( 0 , Infinity ) ; one ( -Infinity , -Infinity ) ; one ( -Infinity , 0 ) ; one ( 0 , -Infinity ) ; one ( -Infinity , Infinity ) ; one ( Infinity , -Infinity ) ; } );