From 9a01ae8379b0a4bc37cf50f7aeba63fddeb523c4 Mon Sep 17 00:00:00 2001 From: Sebastian Willenborg Date: Tue, 20 Mar 2018 17:36:37 +0100 Subject: [PATCH] Fix tests when using go 1.10 (#949) --- bindings/go/unicorn/unicorn_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bindings/go/unicorn/unicorn_test.go b/bindings/go/unicorn/unicorn_test.go index 6627528f..fd652070 100644 --- a/bindings/go/unicorn/unicorn_test.go +++ b/bindings/go/unicorn/unicorn_test.go @@ -1,7 +1,6 @@ package unicorn import ( - "fmt" "testing" ) @@ -21,7 +20,7 @@ func TestMemUnmap(t *testing.T) { t.Fatal(err) } if err := mu.MemWrite(0x1000, tmp); err.(UcError) != ERR_WRITE_UNMAPPED { - t.Fatal(fmt.Errorf("Expected ERR_WRITE_UNMAPPED, got: %v", err)) + t.Fatalf("Expected ERR_WRITE_UNMAPPED, got: %v", err) } } @@ -70,6 +69,6 @@ func TestQuery(t *testing.T) { t.Fatal(err) } if mode != MODE_THUMB { - t.Fatal("query returned invalid mode: %d != %d", mode, MODE_THUMB) + t.Fatalf("query returned invalid mode: %d != %d", mode, MODE_THUMB) } }