]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/persistent/hashtables/hashtables-tests.factor
factor: second stab at [ ] [ ] unit-test -> { } [ ] unit-test
[factor.git] / basis / persistent / hashtables / hashtables-tests.factor
index ade48785a146f9145623ac28535bd085570d7fc7..9fcd4de9b9acff50cce9809841141e59736c9a2e 100644 (file)
@@ -2,13 +2,13 @@ IN: persistent.hashtables.tests
 USING: persistent.hashtables persistent.assocs hashtables assocs
 tools.test kernel locals namespaces random math.ranges sequences fry ;
 
-[ t ] [ PH{ } assoc-empty? ] unit-test
+{ t } [ PH{ } assoc-empty? ] unit-test
 
-[ PH{ { "A" "B" } } ] [ PH{ } "B" "A" rot new-at ] unit-test
+{ PH{ { "A" "B" } } } [ PH{ } "B" "A" rot new-at ] unit-test
 
-[ "B" ] [ "A" PH{ { "A" "B" } } at ] unit-test
+{ "B" } [ "A" PH{ { "A" "B" } } at ] unit-test
 
-[ f ] [ "X" PH{ { "A" "B" } } at ] unit-test
+{ f } [ "X" PH{ { "A" "B" } } at ] unit-test
 
 ! We have to define these first so that they're compiled before
 ! the below hashtables are parsed...
@@ -24,59 +24,59 @@ M: hash-0-b hashcode* 2drop 0 ;
 
 >>
 
-[ ] [
+{ } [
     PH{ }
     "a" T{ hash-0-a } rot new-at
     "b" T{ hash-0-b } rot new-at
     "ph" set
 ] unit-test
 
-[
+{
     H{
         { T{ hash-0-a } "a" }
         { T{ hash-0-b } "b" }
     }
-] [ "ph" get >hashtable ] unit-test
+} [ "ph" get >hashtable ] unit-test
 
-[
+{
     H{
         { T{ hash-0-b } "b" }
     }
-] [ "ph" get T{ hash-0-a } swap pluck-at >hashtable ] unit-test
+} [ "ph" get T{ hash-0-a } swap pluck-at >hashtable ] unit-test
 
-[
+{
     H{
         { T{ hash-0-a } "a" }
     }
-] [ "ph" get T{ hash-0-b } swap pluck-at >hashtable ] unit-test
+} [ "ph" get T{ hash-0-b } swap pluck-at >hashtable ] unit-test
 
-[
+{
     H{
         { T{ hash-0-a } "a" }
         { T{ hash-0-b } "b" }
     }
-] [ "ph" get "X" swap pluck-at >hashtable ] unit-test
+} [ "ph" get "X" swap pluck-at >hashtable ] unit-test
 
-[ ] [
+{ } [
     PH{ }
     "B" "A" rot new-at
     "D" "C" rot new-at
     "ph" set
 ] unit-test
 
-[ H{ { "A" "B" } { "C" "D" } } ] [
+{ H{ { "A" "B" } { "C" "D" } } } [
     "ph" get >hashtable
 ] unit-test
 
-[ H{ { "C" "D" } } ] [
+{ H{ { "C" "D" } } } [
     "ph" get "A" swap pluck-at >hashtable
 ] unit-test
 
-[ H{ { "A" "B" } { "C" "D" } { "E" "F" } } ] [
+{ H{ { "A" "B" } { "C" "D" } { "E" "F" } } } [
     "ph" get "F" "E" rot new-at >hashtable
 ] unit-test
 
-[ H{ { "C" "D" } { "E" "F" } } ] [
+{ H{ { "C" "D" } { "E" "F" } } } [
     "ph" get "F" "E" rot new-at "A" swap pluck-at >hashtable
 ] unit-test
 
@@ -96,16 +96,16 @@ M: hash-0-b hashcode* 2drop 0 ;
 : test-persistent-hashtables-1 ( n -- ? )
     random-assocs ok? ;
 
-[ t ] [ 10 test-persistent-hashtables-1 ] unit-test
-[ t ] [ 20 test-persistent-hashtables-1 ] unit-test
-[ t ] [ 30 test-persistent-hashtables-1 ] unit-test
-[ t ] [ 50 test-persistent-hashtables-1 ] unit-test
-[ t ] [ 100 test-persistent-hashtables-1 ] unit-test
-[ t ] [ 500 test-persistent-hashtables-1 ] unit-test
-[ t ] [ 1000 test-persistent-hashtables-1 ] unit-test
-[ t ] [ 5000 test-persistent-hashtables-1 ] unit-test
-[ t ] [ 10000 test-persistent-hashtables-1 ] unit-test
-[ t ] [ 50000 test-persistent-hashtables-1 ] unit-test
+{ t } [ 10 test-persistent-hashtables-1 ] unit-test
+{ t } [ 20 test-persistent-hashtables-1 ] unit-test
+{ t } [ 30 test-persistent-hashtables-1 ] unit-test
+{ t } [ 50 test-persistent-hashtables-1 ] unit-test
+{ t } [ 100 test-persistent-hashtables-1 ] unit-test
+{ t } [ 500 test-persistent-hashtables-1 ] unit-test
+{ t } [ 1000 test-persistent-hashtables-1 ] unit-test
+{ t } [ 5000 test-persistent-hashtables-1 ] unit-test
+{ t } [ 10000 test-persistent-hashtables-1 ] unit-test
+{ t } [ 50000 test-persistent-hashtables-1 ] unit-test
 
 : test-persistent-hashtables-2 ( n -- ? )
     random-assocs
@@ -114,4 +114,4 @@ M: hash-0-b hashcode* 2drop 0 ;
         2dup ok?
     ] all? 2nip ;
 
-[ t ] [ 6000 test-persistent-hashtables-2 ] unit-test
+{ t } [ 6000 test-persistent-hashtables-2 ] unit-test