Debian Codegraph @

test/fixedbugs/issue29264.go

raw
1 // run
2
3 // Copyright 2018 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
6
7 // Verify that we emit a valid type descriptor for
8 // a fairly deeply nested type.
9
10 package main
11
12 import "fmt"
13 import "strings"
14
15 func main() {
16 a := [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]int{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{42}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
17 got := fmt.Sprint(a)
18 want := strings.Repeat("[", 100) + "42" + strings.Repeat("]", 100)
19 if got != want {
20 fmt.Printf("got %q\nwant %q\n", got, want)
21 }
22 }