summaryrefslogtreecommitdiffhomepage
path: root/tools/go_marshal/test/test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tools/go_marshal/test/test.go')
-rw-r--r--tools/go_marshal/test/test.go28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/go_marshal/test/test.go b/tools/go_marshal/test/test.go
index 43df73545..f75ca1b7f 100644
--- a/tools/go_marshal/test/test.go
+++ b/tools/go_marshal/test/test.go
@@ -146,3 +146,31 @@ type SignalSet uint64
//
// +marshal slice:SignalSetAliasSlice
type SignalSetAlias SignalSet
+
+const sizeA = 64
+const sizeB = 8
+
+// TestArray is a test data structure on an array with a constant length.
+//
+// +marshal
+type TestArray [sizeA]int32
+
+// TestArray2 is a newtype on an array with a simple arithmetic expression of
+// constants for the array length.
+//
+// +marshal
+type TestArray2 [sizeA * sizeB]int32
+
+// TestArray2 is a newtype on an array with a simple arithmetic expression of
+// mixed constants and literals for the array length.
+//
+// +marshal
+type TestArray3 [sizeA*sizeB + 12]int32
+
+// Type9 is a test data type containing an array with a non-literal length.
+//
+// +marshal
+type Type9 struct {
+ x int64
+ y [sizeA]int32
+}