]> gitweb.factorcode.org Git - factor.git/commitdiff
checksums.crc32: verify checksum-state is working.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 2 Aug 2016 20:16:30 +0000 (13:16 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 2 Aug 2016 20:16:30 +0000 (13:16 -0700)
core/checksums/crc32/crc32-tests.factor

index a2dca2fe229b03862d6560fa1055a3633192edfe..6922a056ac20e77793318fb852f4964642ec415f 100644 (file)
@@ -1,5 +1,11 @@
-USING: checksums checksums.crc32 tools.test ;
+USING: checksums checksums.crc32 kernel tools.test ;
 
 { B{ 0 0 0 0 } } [ "" crc32 checksum-bytes ] unit-test
 
 { B{ 0xcb 0xf4 0x39 0x26 } } [ "123456789" crc32 checksum-bytes ] unit-test
+
+{ t } [
+    "resource:LICENSE.txt" crc32
+    [ [ swap add-checksum-file get-checksum ] with-checksum-state ]
+    [ checksum-file ] 2bi =
+] unit-test