(use srfi-4 byte-blob blob-record test) (define-blob-record testrec (testrec? make-testrec testrec-size) (blob->testrec testrec->blob) (x 8 testrec-x s16vector->byte-blob byte-blob->s16vector) (y 4 testrec-y string->byte-blob byte-blob->string) (z 12 testrec-z f32vector->byte-blob byte-blob->f32vector)) (define-record-printer (testrec x out) (fprintf out "#" (testrec-x x) (testrec-y x) (testrec-z x))) (define a (make-testrec (s16vector 1 3 5 7) "blah" (f32vector 4.0 5.0 6.0))) (test-group "blob-record test" (test (->string a) (->string a) (->string (blob->testrec (testrec->blob a)))) )