Home | History | Annotate | Download | only in testdata
      1 //gofmt -s
      2 
      3 package P
      4 
      5 type T struct {
      6 	x, y int
      7 }
      8 
      9 var _ = [42]T{
     10 	T{},
     11 	T{1, 2},
     12 	T{3, 4},
     13 }
     14 
     15 var _ = [...]T{
     16 	T{},
     17 	T{1, 2},
     18 	T{3, 4},
     19 }
     20 
     21 var _ = []T{
     22 	T{},
     23 	T{1, 2},
     24 	T{3, 4},
     25 }
     26 
     27 var _ = []T{
     28 	T{},
     29 	10: T{1, 2},
     30 	20: T{3, 4},
     31 }
     32 
     33 var _ = []struct {
     34 	x, y int
     35 }{
     36 	struct{ x, y int }{},
     37 	10: struct{ x, y int }{1, 2},
     38 	20: struct{ x, y int }{3, 4},
     39 }
     40 
     41 var _ = []interface{}{
     42 	T{},
     43 	10: T{1, 2},
     44 	20: T{3, 4},
     45 }
     46 
     47 var _ = [][]int{
     48 	[]int{},
     49 	[]int{1, 2},
     50 	[]int{3, 4},
     51 }
     52 
     53 var _ = [][]int{
     54 	([]int{}),
     55 	([]int{1, 2}),
     56 	[]int{3, 4},
     57 }
     58 
     59 var _ = [][][]int{
     60 	[][]int{},
     61 	[][]int{
     62 		[]int{},
     63 		[]int{0, 1, 2, 3},
     64 		[]int{4, 5},
     65 	},
     66 }
     67 
     68 var _ = map[string]T{
     69 	"foo": T{},
     70 	"bar": T{1, 2},
     71 	"bal": T{3, 4},
     72 }
     73 
     74 var _ = map[string]struct {
     75 	x, y int
     76 }{
     77 	"foo": struct{ x, y int }{},
     78 	"bar": struct{ x, y int }{1, 2},
     79 	"bal": struct{ x, y int }{3, 4},
     80 }
     81 
     82 var _ = map[string]interface{}{
     83 	"foo": T{},
     84 	"bar": T{1, 2},
     85 	"bal": T{3, 4},
     86 }
     87 
     88 var _ = map[string][]int{
     89 	"foo": []int{},
     90 	"bar": []int{1, 2},
     91 	"bal": []int{3, 4},
     92 }
     93 
     94 var _ = map[string][]int{
     95 	"foo": ([]int{}),
     96 	"bar": ([]int{1, 2}),
     97 	"bal": []int{3, 4},
     98 }
     99 
    100 // from exp/4s/data.go
    101 var pieces4 = []Piece{
    102 	Piece{0, 0, Point{4, 1}, []Point{Point{0, 0}, Point{1, 0}, Point{1, 0}, Point{1, 0}}, nil, nil},
    103 	Piece{1, 0, Point{1, 4}, []Point{Point{0, 0}, Point{0, 1}, Point{0, 1}, Point{0, 1}}, nil, nil},
    104 	Piece{2, 0, Point{4, 1}, []Point{Point{0, 0}, Point{1, 0}, Point{1, 0}, Point{1, 0}}, nil, nil},
    105 	Piece{3, 0, Point{1, 4}, []Point{Point{0, 0}, Point{0, 1}, Point{0, 1}, Point{0, 1}}, nil, nil},
    106 }
    107 
    108 var _ = [42]*T{
    109 	&T{},
    110 	&T{1, 2},
    111 	&T{3, 4},
    112 }
    113 
    114 var _ = [...]*T{
    115 	&T{},
    116 	&T{1, 2},
    117 	&T{3, 4},
    118 }
    119 
    120 var _ = []*T{
    121 	&T{},
    122 	&T{1, 2},
    123 	&T{3, 4},
    124 }
    125 
    126 var _ = []*T{
    127 	&T{},
    128 	10: &T{1, 2},
    129 	20: &T{3, 4},
    130 }
    131 
    132 var _ = []*struct {
    133 	x, y int
    134 }{
    135 	&struct{ x, y int }{},
    136 	10: &struct{ x, y int }{1, 2},
    137 	20: &struct{ x, y int }{3, 4},
    138 }
    139 
    140 var _ = []interface{}{
    141 	&T{},
    142 	10: &T{1, 2},
    143 	20: &T{3, 4},
    144 }
    145 
    146 var _ = []*[]int{
    147 	&[]int{},
    148 	&[]int{1, 2},
    149 	&[]int{3, 4},
    150 }
    151 
    152 var _ = []*[]int{
    153 	(&[]int{}),
    154 	(&[]int{1, 2}),
    155 	&[]int{3, 4},
    156 }
    157 
    158 var _ = []*[]*[]int{
    159 	&[]*[]int{},
    160 	&[]*[]int{
    161 		&[]int{},
    162 		&[]int{0, 1, 2, 3},
    163 		&[]int{4, 5},
    164 	},
    165 }
    166 
    167 var _ = map[string]*T{
    168 	"foo": &T{},
    169 	"bar": &T{1, 2},
    170 	"bal": &T{3, 4},
    171 }
    172 
    173 var _ = map[string]*struct {
    174 	x, y int
    175 }{
    176 	"foo": &struct{ x, y int }{},
    177 	"bar": &struct{ x, y int }{1, 2},
    178 	"bal": &struct{ x, y int }{3, 4},
    179 }
    180 
    181 var _ = map[string]interface{}{
    182 	"foo": &T{},
    183 	"bar": &T{1, 2},
    184 	"bal": &T{3, 4},
    185 }
    186 
    187 var _ = map[string]*[]int{
    188 	"foo": &[]int{},
    189 	"bar": &[]int{1, 2},
    190 	"bal": &[]int{3, 4},
    191 }
    192 
    193 var _ = map[string]*[]int{
    194 	"foo": (&[]int{}),
    195 	"bar": (&[]int{1, 2}),
    196 	"bal": &[]int{3, 4},
    197 }
    198 
    199 var pieces4 = []*Piece{
    200 	&Piece{0, 0, Point{4, 1}, []Point{Point{0, 0}, Point{1, 0}, Point{1, 0}, Point{1, 0}}, nil, nil},
    201 	&Piece{1, 0, Point{1, 4}, []Point{Point{0, 0}, Point{0, 1}, Point{0, 1}, Point{0, 1}}, nil, nil},
    202 	&Piece{2, 0, Point{4, 1}, []Point{Point{0, 0}, Point{1, 0}, Point{1, 0}, Point{1, 0}}, nil, nil},
    203 	&Piece{3, 0, Point{1, 4}, []Point{Point{0, 0}, Point{0, 1}, Point{0, 1}, Point{0, 1}}, nil, nil},
    204 }
    205