]> gitweb.factorcode.org Git - factor.git/blob - basis/hash2/hash2-tests.factor
f3c17bb04bc333b80f36d0301837d61e8f3ff019
[factor.git] / basis / hash2 / hash2-tests.factor
1 USING: tools.test hash2 kernel ;
2 IN: hash2.tests
3
4 : sample-hash
5     5 <hash2>
6     dup 2 3 "foo" roll set-hash2
7     dup 4 2 "bar" roll set-hash2
8     dup 4 7 "other" roll set-hash2 ;
9
10 [ "foo" ] [ 2 3 sample-hash hash2 ] unit-test
11 [ "bar" ] [ 4 2 sample-hash hash2 ] unit-test
12 [ "other" ] [ 4 7 sample-hash hash2 ] unit-test
13 [ f ] [ 4 12 sample-hash hash2 ] unit-test
14 [ f ] [ 1 1 sample-hash hash2 ] unit-test