[llvm] r321509 - [bindings/go] fix vet errors

Andrew Wilkins via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 27 20:10:09 PST 2017


Author: axw
Date: Wed Dec 27 20:10:09 2017
New Revision: 321509

URL: http://llvm.org/viewvc/llvm-project?rev=321509&view=rev
Log:
[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!


Modified:
    llvm/trunk/bindings/go/llvm/ir_test.go

Modified: llvm/trunk/bindings/go/llvm/ir_test.go
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/go/llvm/ir_test.go?rev=321509&r1=321508&r2=321509&view=diff
==============================================================================
--- llvm/trunk/bindings/go/llvm/ir_test.go (original)
+++ llvm/trunk/bindings/go/llvm/ir_test.go Wed Dec 27 20:10:09 2017
@@ -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")




More information about the llvm-commits mailing list