summaryrefslogtreecommitdiffstats
path: root/tests/017
diff options
context:
space:
mode:
Diffstat (limited to 'tests/017')
-rw-r--r--tests/017/bitfields.tl13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/017/bitfields.tl b/tests/017/bitfields.tl
index 0dbb459d..dd0aab3c 100644
--- a/tests/017/bitfields.tl
+++ b/tests/017/bitfields.tl
@@ -585,3 +585,16 @@
(b0 (bit 8 (pack 1 (align 1 (bit 8 le-uint32)))))))
(conv-test #S(s13 x #x7f b0 #xff) #b'7fff0000')
+
+(typedef s14 (pack (struct s14
+ (a (bit 9 le-uint32))
+ (b (bit 7 le-uint32)))))
+
+(conv-test #S(s14 a #x1ff b #x7f) #b'ffff')
+
+(typedef s15 (pack (struct s15
+ (x uint8)
+ (a (bit 9 le-uint32))
+ (b (bit 7 le-uint32)))))
+
+(conv-test #S(s15 x 0 a #x1ff b #x7f) #b'00ffff')