add test for define-serializable-cstruct
at top level
This commit is contained in:
parent
8dcfd3d266
commit
a9b658bb4c
|
@ -702,7 +702,6 @@
|
|||
|
||||
(err/rt-test (in-array '(1 2 3)) exn:fail:contract?))
|
||||
|
||||
|
||||
;; check cstruct serialization (define-serialize-cstruct must be at module level, can't use (let () ...))
|
||||
(module mod-cstruct-serialize racket/base
|
||||
(require (for-syntax racket/base)
|
||||
|
@ -1060,6 +1059,12 @@
|
|||
|
||||
(require (only-in 'mod-cstruct-serialize))
|
||||
|
||||
;; Check that `define-serializable-cstruct' works in a top-level context
|
||||
(require racket/serialize
|
||||
ffi/serialize-cstruct)
|
||||
(define-serializable-cstruct _serializable-example-1 ([a _int]))
|
||||
(test 17 serializable-example-1-a (deserialize (serialize (make-serializable-example-1 17))))
|
||||
|
||||
;; ----------------------------------------
|
||||
|
||||
(define-cpointer-type _foo)
|
||||
|
|
Loading…
Reference in New Issue
Block a user