We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f48e5da commit fd860fcCopy full SHA for fd860fc
src/slices/slices_test.go
@@ -1113,7 +1113,8 @@ func TestConcat(t *testing.T) {
1113
}
1114
1115
func TestConcat_too_large(t *testing.T) {
1116
- type b [0]byte
+ // Use zero length element to minimize memory in testing
1117
+ type void struct{}
1118
cases := []struct {
1119
lengths []int
1120
shouldPanic bool
@@ -1149,9 +1150,9 @@ func TestConcat_too_large(t *testing.T) {
1149
1150
1151
for _, tc := range cases {
1152
var r any
- var ss [][]b
1153
+ ss := make([][]void, 0, len(tc.lengths))
1154
for _, l := range tc.lengths {
- s := make([]b, l)
1155
+ s := make([]void, l)
1156
ss = append(ss, s)
1157
1158
func() {
0 commit comments