Add variant regtests
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 17 Nov 2013 22:04:23 +0000 (17:04 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 17 Nov 2013 22:04:23 +0000 (17:04 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
21 files changed:
tests/1.8/regression/metadata/fail/struct-align-enum/metadata [new file with mode: 0644]
tests/1.8/regression/metadata/fail/struct-align-huge/metadata [new file with mode: 0644]
tests/1.8/regression/metadata/fail/struct-align-negative/metadata [new file with mode: 0644]
tests/1.8/regression/metadata/fail/struct-align-string/metadata [new file with mode: 0644]
tests/1.8/regression/metadata/fail/struct-align-zero/metadata [new file with mode: 0644]
tests/1.8/regression/metadata/fail/variant-missing-selector/metadata [new file with mode: 0644]
tests/1.8/regression/metadata/fail/variant-missing-tag/metadata [new file with mode: 0644]
tests/1.8/regression/metadata/fail/variant-string-fields/metadata [new file with mode: 0644]
tests/1.8/regression/metadata/fail/variant-tag-integer/metadata [new file with mode: 0644]
tests/1.8/regression/metadata/fail/variant-tag-keyword/metadata [new file with mode: 0644]
tests/1.8/regression/metadata/fail/variant-tag-string/metadata [new file with mode: 0644]
tests/1.8/regression/metadata/fail/variant-tag-type-floating/metadata [new file with mode: 0644]
tests/1.8/regression/metadata/fail/variant-tag-type-string/metadata [new file with mode: 0644]
tests/1.8/regression/metadata/pass/struct-align-valid/metadata [new file with mode: 0644]
tests/1.8/regression/metadata/pass/variant-integers-unnamed/metadata [new file with mode: 0644]
tests/1.8/regression/metadata/pass/variant-integers/metadata [new file with mode: 0644]
tests/1.8/regression/metadata/pass/variant-missing-selector/metadata [new file with mode: 0644]
tests/1.8/regression/metadata/pass/variant-scope-tag/metadata [new file with mode: 0644]
tests/1.8/regression/metadata/pass/variant-structs/metadata [new file with mode: 0644]
tests/1.8/regression/metadata/pass/variant-two-levels-redefinition/metadata [new file with mode: 0644]
tests/1.8/regression/metadata/pass/variant-two-levels/metadata [new file with mode: 0644]

diff --git a/tests/1.8/regression/metadata/fail/struct-align-enum/metadata b/tests/1.8/regression/metadata/fail/struct-align-enum/metadata
new file mode 100644 (file)
index 0000000..0fd645c
--- /dev/null
@@ -0,0 +1,22 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[16];
+       };
+};
+
+enum : uint32_t {
+  X = 8
+};
+
+struct Dummy1 {
+ uint8_t x;
+} align(X);
diff --git a/tests/1.8/regression/metadata/fail/struct-align-huge/metadata b/tests/1.8/regression/metadata/fail/struct-align-huge/metadata
new file mode 100644 (file)
index 0000000..bd603b1
--- /dev/null
@@ -0,0 +1,23 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[16];
+       };
+};
+
+struct Dummy1 {
+ uint8_t x;
+} align(0xFFFFFFFFU);
+
+struct Dummy2 {
+ uint8_t x;
+} align(0xFFFFFFFFFFFFFFFFULL);
+
diff --git a/tests/1.8/regression/metadata/fail/struct-align-negative/metadata b/tests/1.8/regression/metadata/fail/struct-align-negative/metadata
new file mode 100644 (file)
index 0000000..ec7b5f5
--- /dev/null
@@ -0,0 +1,19 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[16];
+       };
+};
+
+struct Dummy1 {
+ uint8_t x;
+} align(-8);
+
diff --git a/tests/1.8/regression/metadata/fail/struct-align-string/metadata b/tests/1.8/regression/metadata/fail/struct-align-string/metadata
new file mode 100644 (file)
index 0000000..4d6d074
--- /dev/null
@@ -0,0 +1,18 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[16];
+       };
+};
+
+struct Dummy1 {
+ uint8_t x;
+} align("duh");
diff --git a/tests/1.8/regression/metadata/fail/struct-align-zero/metadata b/tests/1.8/regression/metadata/fail/struct-align-zero/metadata
new file mode 100644 (file)
index 0000000..eeed9a7
--- /dev/null
@@ -0,0 +1,19 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[16];
+       };
+};
+
+struct Dummy1 {
+ uint8_t x;
+} align(0);
+
diff --git a/tests/1.8/regression/metadata/fail/variant-missing-selector/metadata b/tests/1.8/regression/metadata/fail/variant-missing-selector/metadata
new file mode 100644 (file)
index 0000000..7aa82fa
--- /dev/null
@@ -0,0 +1,25 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[0x10];
+       };
+};
+
+struct Mystruct {
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant MyVariant<tag> {
+  struct { uint8_t _; } sel1;
+  struct { uint16_t _; } sel2;
+} field;
+
+};
\ No newline at end of file
diff --git a/tests/1.8/regression/metadata/fail/variant-missing-tag/metadata b/tests/1.8/regression/metadata/fail/variant-missing-tag/metadata
new file mode 100644 (file)
index 0000000..cf1c984
--- /dev/null
@@ -0,0 +1,27 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[0x10];
+       };
+};
+
+struct Mystruct {
+
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant <> {
+  struct { uint8_t _; } sel1;
+  struct { uint16_t _; } sel2;
+  struct { uint32_t _; } sel3;
+} field;
+
+};
\ No newline at end of file
diff --git a/tests/1.8/regression/metadata/fail/variant-string-fields/metadata b/tests/1.8/regression/metadata/fail/variant-string-fields/metadata
new file mode 100644 (file)
index 0000000..926bec3
--- /dev/null
@@ -0,0 +1,27 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[0x10];
+       };
+};
+
+struct Mystruct {
+
+enum : uint32_t { " sel1 ", " sel2 ", " sel3 " } tag;
+
+variant MyVariant<tag> {
+  struct { uint8_t _; } sel1;
+  struct { uint16_t _; } sel2;
+  struct { uint32_t _; } sel3;
+} field;
+
+};
\ No newline at end of file
diff --git a/tests/1.8/regression/metadata/fail/variant-tag-integer/metadata b/tests/1.8/regression/metadata/fail/variant-tag-integer/metadata
new file mode 100644 (file)
index 0000000..46b3a4b
--- /dev/null
@@ -0,0 +1,27 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[0x10];
+       };
+};
+
+struct Mystruct {
+
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant <2> {
+  struct { uint8_t _; } sel1;
+  struct { uint16_t _; } sel2;
+  struct { uint32_t _; } sel3;
+} field;
+
+};
\ No newline at end of file
diff --git a/tests/1.8/regression/metadata/fail/variant-tag-keyword/metadata b/tests/1.8/regression/metadata/fail/variant-tag-keyword/metadata
new file mode 100644 (file)
index 0000000..000226a
--- /dev/null
@@ -0,0 +1,27 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[0x10];
+       };
+};
+
+struct Mystruct {
+
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant <variant> {
+  struct { uint8_t _; } sel1;
+  struct { uint16_t _; } sel2;
+  struct { uint32_t _; } sel3;
+} field;
+
+};
\ No newline at end of file
diff --git a/tests/1.8/regression/metadata/fail/variant-tag-string/metadata b/tests/1.8/regression/metadata/fail/variant-tag-string/metadata
new file mode 100644 (file)
index 0000000..fc89a6f
--- /dev/null
@@ -0,0 +1,27 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[0x10];
+       };
+};
+
+struct Mystruct {
+
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant <"tag"> {
+  struct { uint8_t _; } sel1;
+  struct { uint16_t _; } sel2;
+  struct { uint32_t _; } sel3;
+} field;
+
+};
\ No newline at end of file
diff --git a/tests/1.8/regression/metadata/fail/variant-tag-type-floating/metadata b/tests/1.8/regression/metadata/fail/variant-tag-type-floating/metadata
new file mode 100644 (file)
index 0000000..2ee997b
--- /dev/null
@@ -0,0 +1,25 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+typealias floating_point { exp_dig = 8; mant_dig = 24; } := FLOAT;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[0x10];
+       };
+};
+
+struct Mystruct {
+
+FLOAT tag;
+
+variant <tag> {
+} field;
+
+};
\ No newline at end of file
diff --git a/tests/1.8/regression/metadata/fail/variant-tag-type-string/metadata b/tests/1.8/regression/metadata/fail/variant-tag-type-string/metadata
new file mode 100644 (file)
index 0000000..c875127
--- /dev/null
@@ -0,0 +1,25 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+typealias string { encoding = ascii; } := str;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[0x10];
+       };
+};
+
+struct Mystruct {
+
+str tag;
+
+variant <tag> {
+} field;
+
+};
\ No newline at end of file
diff --git a/tests/1.8/regression/metadata/pass/struct-align-valid/metadata b/tests/1.8/regression/metadata/pass/struct-align-valid/metadata
new file mode 100644 (file)
index 0000000..ad8e755
--- /dev/null
@@ -0,0 +1,26 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[16];
+       };
+};
+
+struct Dummy1 {
+ uint8_t x;
+} align(8);
+
+struct Dummy2 {
+ uint8_t x;
+} align(16);
+
+struct Dummy3 {
+ uint8_t x;
+} align(32);
\ No newline at end of file
diff --git a/tests/1.8/regression/metadata/pass/variant-integers-unnamed/metadata b/tests/1.8/regression/metadata/pass/variant-integers-unnamed/metadata
new file mode 100644 (file)
index 0000000..c99cec8
--- /dev/null
@@ -0,0 +1,26 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[16];
+       };
+};
+
+struct Mystruct {
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant<tag> {
+  uint8_t sel1;
+  uint16_t sel2;
+  uint32_t sel3;
+} field;
+
+};
\ No newline at end of file
diff --git a/tests/1.8/regression/metadata/pass/variant-integers/metadata b/tests/1.8/regression/metadata/pass/variant-integers/metadata
new file mode 100644 (file)
index 0000000..cbcdd0c
--- /dev/null
@@ -0,0 +1,26 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[16];
+       };
+};
+
+struct Mystruct {
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant MyVariant<tag> {
+  uint8_t sel1;
+  uint16_t sel2;
+  uint32_t sel3;
+} field;
+
+};
\ No newline at end of file
diff --git a/tests/1.8/regression/metadata/pass/variant-missing-selector/metadata b/tests/1.8/regression/metadata/pass/variant-missing-selector/metadata
new file mode 100644 (file)
index 0000000..7aa82fa
--- /dev/null
@@ -0,0 +1,25 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[0x10];
+       };
+};
+
+struct Mystruct {
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant MyVariant<tag> {
+  struct { uint8_t _; } sel1;
+  struct { uint16_t _; } sel2;
+} field;
+
+};
\ No newline at end of file
diff --git a/tests/1.8/regression/metadata/pass/variant-scope-tag/metadata b/tests/1.8/regression/metadata/pass/variant-scope-tag/metadata
new file mode 100644 (file)
index 0000000..0961f7b
--- /dev/null
@@ -0,0 +1,29 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[0x10];
+       };
+};
+
+typealias  enum : uint32_t { sel1, sel2, sel3 } := X;
+
+struct MyStruct {
+
+X tag;
+
+variant Y<tag> {
+  struct { uint8_t _; } sel1;
+  struct { uint16_t _; } sel2;
+  struct { uint32_t _; } sel3;
+} field;
+
+};
\ No newline at end of file
diff --git a/tests/1.8/regression/metadata/pass/variant-structs/metadata b/tests/1.8/regression/metadata/pass/variant-structs/metadata
new file mode 100644 (file)
index 0000000..bb41933
--- /dev/null
@@ -0,0 +1,26 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[0x10];
+       };
+};
+
+struct Mystruct {
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant MyVariant<tag> {
+  struct { uint8_t _; } sel1;
+  struct { uint16_t _; } sel2;
+  struct { uint32_t _; } sel3;
+} field;
+
+};
\ No newline at end of file
diff --git a/tests/1.8/regression/metadata/pass/variant-two-levels-redefinition/metadata b/tests/1.8/regression/metadata/pass/variant-two-levels-redefinition/metadata
new file mode 100644 (file)
index 0000000..df5b5a3
--- /dev/null
@@ -0,0 +1,47 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[0x10];
+       };
+};
+
+struct Mystruct {
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant<tag> {
+  struct {
+       enum : uint32_t { s1, s2, s3 } tag;
+    variant<tag> {
+         uint8_t s1;
+         uint8_t s2;
+         uint8_t s3;
+       } _;
+  } sel1;
+  struct {
+       enum : uint32_t { s1, s2, s3 } tag;
+    variant<tag> {
+         uint16_t s1;
+         uint16_t s2;
+         uint16_t s3;
+       } _;
+  } sel2;
+  struct {
+       enum : uint32_t { s1, s2, s3 } tag;
+    variant<tag> {
+         uint32_t s1;
+         uint32_t s2;
+         uint32_t s3;
+       } _;
+  } sel3;
+} field;
+
+};
\ No newline at end of file
diff --git a/tests/1.8/regression/metadata/pass/variant-two-levels/metadata b/tests/1.8/regression/metadata/pass/variant-two-levels/metadata
new file mode 100644 (file)
index 0000000..ba92186
--- /dev/null
@@ -0,0 +1,44 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; base = 10; } := uint16_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[0x10];
+       };
+};
+
+struct Mystruct {
+enum : uint32_t { sel1, sel2, sel3 } tag;
+
+variant<tag> {
+  struct {
+    variant<tag> {
+         uint8_t sel1;
+         uint8_t sel2;
+         uint8_t sel3;
+       } _;
+  } sel1;
+  struct {
+    variant<tag> {
+         uint16_t sel1;
+         uint16_t sel2;
+         uint16_t sel3;
+       } _;
+  } sel2;
+  struct {
+    variant<tag> {
+         uint32_t sel1;
+         uint32_t sel2;
+         uint32_t sel3;
+       } _;
+  } sel3;
+} field;
+
+};
\ No newline at end of file
This page took 0.03211 seconds and 4 git commands to generate.