llvm.org GIT mirror llvm / bcc3579
[bindings/go] fix vet errors Fix "go vet" errors, which will be run automatically with "go test" as of Go 1.10. Patch by Karsten Weiss! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321509 91177308-0d34-0410-b5e6-96231b3b80d8 Andrew Wilkins 1 year, 10 months ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
141141 int_pointer := PointerType(cont.Int32Type(), 0)
142142 int_inner := int_pointer.Subtypes()
143143 if len(int_inner) != 1 {
144 t.Errorf("Got size %d, though wanted 1")
144 t.Errorf("Got size %d, though wanted 1", len(int_inner))
145145 }
146146 if int_inner[0] != cont.Int32Type() {
147147 t.Errorf("Expected int32 type")
150150 st_pointer := cont.StructType([]Type{cont.Int32Type(), cont.Int8Type()}, false)
151151 st_inner := st_pointer.Subtypes()
152152 if len(st_inner) != 2 {
153 t.Errorf("Got size %d, though wanted 2")
153 t.Errorf("Got size %d, though wanted 2", len(int_inner))
154154 }
155155 if st_inner[0] != cont.Int32Type() {
156156 t.Errorf("Expected first struct field to be int32")