;;;; (include-relative "testvectors-test-support") (import test) (import (only (chicken format) format) (test-utils gloss)) (import (chicken base)) (import sha2) (import message-digest-byte-vector) (import testvectors-test-support) (define (test-testvector als) (test-group (test-info-file als) (for-each (lambda (x) (gloss x)) (test-info-text als)) (let ((dat (test-info-data als))) (test (alist-ref 'sha256 als) (message-digest-blob (sha256-primitive) dat)) (test (alist-ref 'sha384 als) (message-digest-blob (sha384-primitive) dat)) (test (alist-ref 'sha512 als) (message-digest-blob (sha512-primitive) dat)) ) ) ) (test-begin "Sha2 Testvectors") (for-each test-testvector (load-testvectors "./testvectors")) (test-end "Sha2 Testvectors") (test-exit)