Skip to content

Commit 95df435

Browse files
🔍 test: Cover ZZ.min and ZZ.max.
1 parent c872535 commit 95df435

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/src/ZZ/minmax.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import test from 'ava' ;
2+
3+
import { ZZ } from '../../../src' ;
4+
5+
test( 'minmax' , t => {
6+
7+
const a = ZZ.from('1037193691267387921739639472846392869238466298463928649236') ;
8+
const b = ZZ.from('102833047307209370991273091273') ;
9+
const c = ZZ.from('-18039809213809128309123702149836492649632832') ;
10+
const d = ZZ.from(-3) ;
11+
12+
t.is( a , ZZ.max(a, b) ) ;
13+
t.is( a , ZZ.max(b, a) ) ;
14+
t.is( b , ZZ.min(a, b) ) ;
15+
t.is( b , ZZ.max(b, c) ) ;
16+
t.is( c , ZZ.min(c, d) ) ;
17+
t.is( c , ZZ.min(b, c) ) ;
18+
t.is( d , ZZ.min(b, d) ) ;
19+
t.is( d , ZZ.max(d, c) ) ;
20+
21+
}) ;

0 commit comments

Comments
 (0)