Add extra tests for math.primes

db4
Samuel Tardieu 2009-06-24 13:13:10 +02:00
parent 41d804ddbd
commit 29b5a1dff5
1 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,5 @@
USING: arrays math math.primes math.primes.miller-rabin
tools.test ;
USING: arrays kernel math math.primes math.primes.miller-rabin
sequences tools.test ;
IN: math.primes.tests
{ 1237 } [ 1234 next-prime ] unit-test
@ -21,3 +21,8 @@ IN: math.primes.tests
[ 100000000000031 ] [ 100000000000000 next-prime ] unit-test
[ 49 ] [ 50 random-prime log2 ] unit-test
[ t ] [ 5000077 dup find-relative-prime coprime? ] unit-test
[ 5 t { 14 14 14 14 14 } ]
[ 5 15 unique-primes [ length ] [ [ prime? ] all? ] [ [ log2 ] map ] tri ] unit-test