]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/mirrors/mirrors-tests.factor
factor: Retrying on the unit tests. Also normalize some syntax with FUNCTION:.
[factor.git] / basis / mirrors / mirrors-tests.factor
index ff6a7707150f750d5eb609283b6a1aec15f53ac7..32de708794a13451b96e459ce701bb9ab8b0a4da 100644 (file)
@@ -6,15 +6,15 @@ TUPLE: foo bar baz ;
 
 C: <foo> foo
 
-[ 2 ] [ 1 2 <foo> <mirror> assoc-size ] unit-test
+{ 2 } [ 1 2 <foo> <mirror> assoc-size ] unit-test
 
-[ { "bar" "baz" } ] [ 1 2 <foo> <mirror> keys ] unit-test
+{ { "bar" "baz" } } [ 1 2 <foo> <mirror> keys ] unit-test
 
-[ 1 t ] [ "bar" 1 2 <foo> <mirror> at* ] unit-test
+{ 1 t } [ "bar" 1 2 <foo> <mirror> at* ] unit-test
 
-[ f f ] [ "hi" 1 2 <foo> <mirror> at* ] unit-test
+{ f f } [ "hi" 1 2 <foo> <mirror> at* ] unit-test
 
-[ 3 ] [
+{ 3 } [
     3 "baz" 1 2 <foo> [ <mirror> set-at ] keep baz>>
 ] unit-test
 
@@ -22,7 +22,7 @@ C: <foo> foo
 
 [ 3 "numerator" 1/2 <mirror> set-at ] must-fail
 
-[ "foo" ] [
+{ "foo" } [
     gensym [
         <mirror> [
             "foo" "name" set
@@ -35,7 +35,7 @@ C: <foo> foo
 TUPLE: declared-mirror-test
 { a integer initial: 0 } ;
 
-[ 5 ] [
+{ 5 } [
     3 declared-mirror-test boa <mirror> [
         5 "a" set
         "a" get
@@ -49,16 +49,16 @@ TUPLE: color
 { green integer }
 { blue integer } ;
 
-[ T{ color f 0 0 0 } ] [
+{ T{ color f 0 0 0 } } [
     1 2 3 color boa [ <mirror> clear-assoc ] keep
 ] unit-test
 
 ! Test reshaping with a mirror
 1 2 3 color boa <mirror> "mirror" set
 
-[ ] [ "IN: mirrors.tests USE: math TUPLE: color { green integer } { red integer } { blue integer } ;" eval( -- ) ] unit-test
+{ } [ "IN: mirrors.tests USE: math TUPLE: color { green integer } { red integer } { blue integer } ;" eval( -- ) ] unit-test
 
-[ 1 ] [ "red" "mirror" get at ] unit-test
+{ 1 } [ "red" "mirror" get at ] unit-test
 
 { 3 } [ { 1 2 3 } make-mirror assoc-size ] unit-test
 { 2 } [ "asdf" make-mirror assoc-size ] unit-test