summaryrefslogtreecommitdiffstats
path: root/tests/017
diff options
context:
space:
mode:
Diffstat (limited to 'tests/017')
-rw-r--r--tests/017/ffi-misc.tl13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/017/ffi-misc.tl b/tests/017/ffi-misc.tl
index 3b3c4438..377d7572 100644
--- a/tests/017/ffi-misc.tl
+++ b/tests/017/ffi-misc.tl
@@ -70,3 +70,16 @@
(typeof (ffi (enumed int64 e (x 0) (y #x7fffffffffffffff)))) ffi-type
(typeof (ffi (enumed int64 e (x #x-8000000000000001)))) :error
(typeof (ffi (enumed int64 e (x #x8000000000000000)))) :error)
+
+(typedef abc (struct abc
+ (a (enumed (bit 1 uint8) bit fals true))
+ (b (enumed (bit 1 uint8) bit fals true))
+ (c (enumed (bit 1 uint8) bit fals true))))
+
+(mtest
+ (sizeof abc) 1
+ (znew abc) #S(abc a fals b fals c fals))
+
+(each-match ((a b c) (rperm '(fals true) 3))
+ (let ((s (new abc a a b b c c)))
+ (test (ffi-get (ffi-put s (ffi abc)) (ffi-abc)) s)))