]> gitweb.factorcode.org Git - factor.git/blob - basis/checksums/superfast/superfast-tests.factor
core: map-integers -> map-integers-as
[factor.git] / basis / checksums / superfast / superfast-tests.factor
1 USING: byte-arrays checksums checksums.superfast fry kernel math
2 sequences tools.test ;
3
4 {
5     {
6         0
7         4064760690
8         2484602674
9         1021960881
10         3514307704
11         762925594
12         95280079
13         516333699
14         1761749771
15         3841726064
16         2549850032
17     }
18 } [
19     "1234567890" [ length 1 + ] keep 0 <superfast>
20     '[ _ swap head _ checksum-bytes ] map-integers
21 ] unit-test
22
23
24 { t } [
25     "1234567890" dup >byte-array [
26         [ length 1 + ] keep 0 <superfast>
27         '[ _ swap head _ checksum-bytes ] map-integers
28     ] bi@ =
29 ] unit-test