]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/io/buffers/buffers-tests.factor
factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!
[factor.git] / basis / io / buffers / buffers-tests.factor
index ab8afc19b68e7a2f08b15a042041e7c72fd85979..c8b1d4abb0d06808b4307033db1060df3534193b 100644 (file)
@@ -13,14 +13,14 @@ io.buffers kernel libc namespaces sequences strings tools.test ;
 : buffer-read-all ( buffer -- byte-array )
     [ buffer@ ] [ buffer-length ] bi memory>byte-array ;
 
-[ B{ } 65536 ] [
+{ B{ } 65536 } [
     65536 <buffer>
     dup buffer-read-all
     over buffer-capacity
     rot dispose
 ] unit-test
 
-[ "hello world" "" ] [
+{ "hello world" "" } [
     "hello world" string>buffer
     dup buffer-read-all >string
     0 pick buffer-reset
@@ -28,29 +28,29 @@ io.buffers kernel libc namespaces sequences strings tools.test ;
     rot dispose
 ] unit-test
 
-[ "hello" ] [
+{ "hello" } [
     "hello world" string>buffer
     5 over buffer-read >string swap dispose
 ] unit-test
 
-[ 11 ] [
+{ 11 } [
     "hello world" string>buffer
     [ buffer-length ] keep dispose
 ] unit-test
 
-[ "hello world" ] [
+{ "hello world" } [
     "hello" 1024 <buffer> [ buffer-set ] keep
     " world" >byte-array binary-object pick buffer-write
     dup buffer-read-all >string swap dispose
 ] unit-test
 
-[ CHAR: e ] [
+{ CHAR: e } [
     "hello" string>buffer
     1 over buffer-consume [ buffer-pop ] keep dispose
 ] unit-test
 
 "hello world" string>buffer "b" set
-[ "hello world" ] [ 1000 "b" get buffer-read >string ] unit-test
+{ "hello world" } [ 1000 "b" get buffer-read >string ] unit-test
 "b" get dispose
 
 100 <buffer> "b" set
@@ -58,16 +58,16 @@ io.buffers kernel libc namespaces sequences strings tools.test ;
 "b" get dispose
 
 "hello world" string>buffer "b" set
-[ "hello" CHAR: \s ] [ " " "b" get buffer-read-until [ >string ] dip ] unit-test
+{ "hello" CHAR: \s } [ " " "b" get buffer-read-until [ >string ] dip ] unit-test
 "b" get dispose
 
-[ 4 B{ 1 2 3 4 0 0 0 0 0 0 } ] [
+{ 4 B{ 1 2 3 4 0 0 0 0 0 0 } } [
     10 <buffer>
     [ B{ 1 2 3 4 } binary-object rot buffer-write ]
     [ 10 <byte-array> [ 10 rot buffer-read-into ] keep ] bi
 ] unit-test
 
-[ 4 { 1 2 3 4 f f f f f f } ] [
+{ 4 { 1 2 3 4 f f f f f f } } [
     10 <buffer>
     [ B{ 1 2 3 4 } binary-object rot buffer-write ]
     [ 10 f <array> [ 10 rot buffer-read-into ] keep ] bi