Skip to content

Commit e0ff5f8

Browse files
🔍 test: Move all predicate test to same file.
1 parent f578729 commit e0ff5f8

File tree

3 files changed

+37
-38
lines changed

3 files changed

+37
-38
lines changed

test/src/Integer/isone.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

test/src/Integer/iszero.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

test/src/Integer/predicates.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,43 @@
11
import test from 'ava' ;
22
import { ZZ } from '../../../src' ;
33

4+
5+
test( 'ZZ.$0().iszero()' , t => { t.is( ZZ.$0().iszero() , true ) ; } ) ;
6+
test( 'ZZ.$1().iszero()' , t => { t.is( ZZ.$1().iszero() , false ) ; } ) ;
7+
8+
test( 'ZZ.from(-2).iszero()' , t => { t.is( ZZ.from(-2).iszero() , false ) ; } ) ;
9+
test( 'ZZ.from(-1).iszero()' , t => { t.is( ZZ.from(-1).iszero() , false ) ; } ) ;
10+
test( 'ZZ.from(0).iszero()' , t => { t.is( ZZ.from(0).iszero() , true ) ; } ) ;
11+
test( 'ZZ.from(-0).iszero()' , t => { t.is( ZZ.from(-0).iszero() , true ) ; } ) ;
12+
test( 'ZZ.from(1).iszero()' , t => { t.is( ZZ.from(1).iszero() , false ) ; } ) ;
13+
test( 'ZZ.from(2).iszero()' , t => { t.is( ZZ.from(2).iszero() , false ) ; } ) ;
14+
15+
test( 'ZZ.from("-2").iszero()' , t => { t.is( ZZ.from("-2").iszero() , false ) ; } ) ;
16+
test( 'ZZ.from("-1").iszero()' , t => { t.is( ZZ.from("-1").iszero() , false ) ; } ) ;
17+
test( 'ZZ.from("0").iszero()' , t => { t.is( ZZ.from("0").iszero() , true ) ; } ) ;
18+
test( 'ZZ.from("-0").iszero()' , t => { t.is( ZZ.from("-0").iszero() , true ) ; } ) ;
19+
test( 'ZZ.from("1").iszero()' , t => { t.is( ZZ.from("1").iszero() , false ) ; } ) ;
20+
test( 'ZZ.from("2").iszero()' , t => { t.is( ZZ.from("2").iszero() , false ) ; } ) ;
21+
22+
23+
test( 'ZZ.$0().isone()' , t => { t.is( ZZ.$0().isone() , false ) ; } ) ;
24+
test( 'ZZ.$1().isone()' , t => { t.is( ZZ.$1().isone() , true ) ; } ) ;
25+
26+
test( 'ZZ.from(-2).isone()' , t => { t.is( ZZ.from(-2).isone() , false ) ; } ) ;
27+
test( 'ZZ.from(-1).isone()' , t => { t.is( ZZ.from(-1).isone() , false ) ; } ) ;
28+
test( 'ZZ.from(0).isone()' , t => { t.is( ZZ.from(0).isone() , false ) ; } ) ;
29+
test( 'ZZ.from(-0).isone()' , t => { t.is( ZZ.from(-0).isone() , false ) ; } ) ;
30+
test( 'ZZ.from(1).isone()' , t => { t.is( ZZ.from(1).isone() , true ) ; } ) ;
31+
test( 'ZZ.from(2).isone()' , t => { t.is( ZZ.from(2).isone() , false ) ; } ) ;
32+
33+
test( 'ZZ.from("-2").isone()' , t => { t.is( ZZ.from("-2").isone() , false ) ; } ) ;
34+
test( 'ZZ.from("-1").isone()' , t => { t.is( ZZ.from("-1").isone() , false ) ; } ) ;
35+
test( 'ZZ.from("0").isone()' , t => { t.is( ZZ.from("0").isone() , false ) ; } ) ;
36+
test( 'ZZ.from("-0").isone()' , t => { t.is( ZZ.from("-0").isone() , false ) ; } ) ;
37+
test( 'ZZ.from("1").isone()' , t => { t.is( ZZ.from("1").isone() , true ) ; } ) ;
38+
test( 'ZZ.from("2").isone()' , t => { t.is( ZZ.from("2").isone() , false ) ; } ) ;
39+
40+
441
test( 'ZZ.$0().isnonzero()' , t => { t.is( ZZ.$0().isnonzero() , false ) ; } ) ;
542
test( 'ZZ.$1().isnonzero()' , t => { t.is( ZZ.$1().isnonzero() , true ) ; } ) ;
643

0 commit comments

Comments
 (0)