]> gitweb.factorcode.org Git - factor.git/commitdiff
fix checksum test -- short circuit so correct error is reported
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 18 May 2009 01:32:43 +0000 (20:32 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 18 May 2009 01:32:43 +0000 (20:32 -0500)
basis/checksums/openssl/openssl-tests.factor

index 253069c95280b102370d5e104d18dca36022a333..2a160e1486e0b3a96e649a44fb4675760b0d45d5 100644 (file)
@@ -1,6 +1,6 @@
+USING: accessors byte-arrays checksums checksums.openssl
+combinators.short-circuit kernel system tools.test ;
 IN: checksums.openssl.tests
-USING: byte-arrays checksums.openssl checksums tools.test
-accessors kernel system ;
 
 [
     B{ 201 238 222 100 92 200 182 188 138 255 129 163 115 88 240 136 }
@@ -22,7 +22,7 @@ accessors kernel system ;
     "Bad checksum test" >byte-array
     "no such checksum" <openssl-checksum>
     checksum-bytes
-] [ [ unknown-digest? ] [ name>> "no such checksum" = ] bi and ]
+] [ { [ unknown-digest? ] [ name>> "no such checksum" = ] } 1&& ]
 must-fail-with
 
 [ ] [ image openssl-sha1 checksum-file drop ] unit-test