move a test

main
Matthew Butterick 6 years ago
parent bd5c93a8bf
commit 7252ab67ef

@ -50,6 +50,9 @@ https://github.com/mbutterick/restructure/blob/master/src/Struct.coffee
(super-new)
(init-field [(@fields fields)])
(when @fields (unless (dict? @fields)
(raise-argument-error '+xstruct "dict" @fields)))
(define/augride (xxdecode port parent [len 0])
;; xstruct-setup and xstruct-parse-fields are separate to cooperate with VersionedStruct
(define decoded-hash
@ -100,8 +103,6 @@ https://github.com/mbutterick/restructure/blob/master/src/Struct.coffee
(unless (symbol? (car kv))
(raise-argument-error '+xstruct "symbol" (car kv)))
(apply cons kv)))
(unless (dict? fields)
(raise-argument-error '+xstruct "dict" fields))
(new class [fields fields]))
(module+ test

Loading…
Cancel
Save