]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/io/sockets/secure/unix/unix-tests.factor
factor: second stab at [ ] [ ] unit-test -> { } [ ] unit-test
[factor.git] / basis / io / sockets / secure / unix / unix-tests.factor
index 41ff568d7c862e8fb3d1deb3314427c8cfca0e68..6611c854fc68a3327376e151d641f571b0a65ec5 100644 (file)
@@ -7,7 +7,7 @@ io.sockets.secure.debug ;
 
 { 1 0 } [ [ ] with-secure-context ] must-infer-as
 
-[ ] [ <promise> "port" set ] unit-test
+{ } [ <promise> "port" set ] unit-test
 
 :: server-test ( quot -- )
     [
@@ -26,14 +26,14 @@ io.sockets.secure.debug ;
         "127.0.0.1" "port" get ?promise <inet4> <secure> ascii <client> drop stream-contents
     ] with-secure-context ;
 
-[ ] [ [ class-of name>> write ] server-test ] unit-test
+{ } [ [ class-of name>> write ] server-test ] unit-test
 
-[ "secure" ] [ client-test ] unit-test
+{ "secure" } [ client-test ] unit-test
 
 ! Now, see what happens if the server closes the connection prematurely
-[ ] [ <promise> "port" set ] unit-test
+{ } [ <promise> "port" set ] unit-test
 
-[ ] [
+{ } [
     [
         drop
         "hello" write flush
@@ -45,13 +45,13 @@ io.sockets.secure.debug ;
 ! (eg, google.com) do this.
 
 ! [ client-test ] [ premature-close? ] must-fail-with
-[ "hello" ] [ client-test ] unit-test
+{ "hello" } [ client-test ] unit-test
 
 ! Now, try validating the certificate. This should fail because its
 ! actually an invalid certificate
-[ ] [ <promise> "port" set ] unit-test
+{ } [ <promise> "port" set ] unit-test
 
-[ ] [ [ drop "hi" write ] server-test ] unit-test
+{ } [ [ drop "hi" write ] server-test ] unit-test
 
 [
     <secure-config> [
@@ -61,9 +61,9 @@ io.sockets.secure.debug ;
 ] [ certificate-verify-error? ] must-fail-with
 
 ! Client-side handshake timeout
-[ ] [ <promise> "port" set ] unit-test
+{ } [ <promise> "port" set ] unit-test
 
-[ ] [
+{ } [
     [
         [
             "127.0.0.1" 0 <inet4> ascii <server> &dispose
@@ -80,9 +80,9 @@ io.sockets.secure.debug ;
 ] [ io-timeout? ] must-fail-with
 
 ! Server-side handshake timeout
-[ ] [ <promise> "port" set ] unit-test
+{ } [ <promise> "port" set ] unit-test
 
-[ ] [
+{ } [
     [
         [
             "127.0.0.1" "port" get ?promise