Skip to content

Commit

Permalink
Concat: nicer test messages
Browse files Browse the repository at this point in the history
  • Loading branch information
earthboundkid committed Jun 27, 2023
1 parent f48e5da commit fd860fc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/slices/slices_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,8 @@ func TestConcat(t *testing.T) {
}

func TestConcat_too_large(t *testing.T) {
type b [0]byte
// Use zero length element to minimize memory in testing
type void struct{}
cases := []struct {
lengths []int
shouldPanic bool
Expand Down Expand Up @@ -1149,9 +1150,9 @@ func TestConcat_too_large(t *testing.T) {
}
for _, tc := range cases {
var r any
var ss [][]b
ss := make([][]void, 0, len(tc.lengths))
for _, l := range tc.lengths {
s := make([]b, l)
s := make([]void, l)
ss = append(ss, s)
}
func() {
Expand Down

0 comments on commit fd860fc

Please sign in to comment.