]> gitweb.factorcode.org Git - factor.git/blob - basis/math/primes/erato/fast/fast-tests.factor
more test IN: cleanup.
[factor.git] / basis / math / primes / erato / fast / fast-tests.factor
1 USING: fry kernel sequences tools.test ;
2
3 {
4
5     V{
6         2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71
7         73 79 83 89 97
8     }
9 } [ 100 sieve ] unit-test
10
11 { 1229 } [ 10,000 sieve length ] unit-test
12 { 9592 } [ 100,000 sieve length ] unit-test
13 { 78498 } [ 1,000,000 sieve length ] unit-test
14
15 { t } [
16     { 2 3 5 7 11 13 } 100 make-sieve '[ _ marked-prime? ] all?
17 ] unit-test
18 { t } [
19     { 4 6 8 9 10 12 } 100 make-sieve '[ _ marked-prime? not ] all?
20 ] unit-test