[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
This commit is contained in:
Andrew Wilkins 2017-12-28 04:10:09 +00:00
parent 486aa20852
commit bcc357919c

View File

@ -142,7 +142,7 @@ func TestSubtypes(t *testing.T) {
int_pointer := PointerType(cont.Int32Type(), 0)
int_inner := int_pointer.Subtypes()
if len(int_inner) != 1 {
t.Errorf("Got size %d, though wanted 1")
t.Errorf("Got size %d, though wanted 1", len(int_inner))
}
if int_inner[0] != cont.Int32Type() {
t.Errorf("Expected int32 type")
@ -151,7 +151,7 @@ func TestSubtypes(t *testing.T) {
st_pointer := cont.StructType([]Type{cont.Int32Type(), cont.Int8Type()}, false)
st_inner := st_pointer.Subtypes()
if len(st_inner) != 2 {
t.Errorf("Got size %d, though wanted 2")
t.Errorf("Got size %d, though wanted 2", len(int_inner))
}
if st_inner[0] != cont.Int32Type() {
t.Errorf("Expected first struct field to be int32")