]> gitweb.factorcode.org Git - factor.git/commitdiff
cuckoo-filters: add tests for lookup each value also.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 8 Aug 2016 21:31:36 +0000 (14:31 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 8 Aug 2016 21:31:36 +0000 (14:31 -0700)
extra/cuckoo-filters/cuckoo-filters-tests.factor

index 3255d2da4057c992b2c58f47b1e5b489aec04b71..af2d363b076dceae464709b51629c74f8161ead9 100644 (file)
@@ -12,7 +12,7 @@ cuckoo-filters kernel math.parser sequences tools.test ;
     } 2cleave
 ] unit-test
 
-{ 250,000 0 } [
+{ 250,000 250,000 0 } [
     250,000 <cuckoo-filter>
     250,000 [ number>string ] { } map-integers
     [
@@ -23,6 +23,7 @@ cuckoo-filters kernel math.parser sequences tools.test ;
             } 1&&
         ] count swap
     ]
-    [ [ over cuckoo-delete drop ] each ] bi
+    [ [ over cuckoo-lookup ] count swap ]
+    [ [ over cuckoo-delete drop ] each ] tri
     size>>
 ] unit-test