From 38034c306693cd0acbc4edb0d0afde1f2e525bf6 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 29 Oct 2014 18:39:51 +0100 Subject: [PATCH] ethwire: fix ClientIdentity test --- ethwire/client_identity_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ethwire/client_identity_test.go b/ethwire/client_identity_test.go index f3c8bfd50a..1724fe57be 100644 --- a/ethwire/client_identity_test.go +++ b/ethwire/client_identity_test.go @@ -9,22 +9,22 @@ import ( func TestClientIdentity(t *testing.T) { clientIdentity := NewSimpleClientIdentity("Ethereum(G)", "0.5.16", "test") clientString := clientIdentity.String() - expected := fmt.Sprintf("Ethereum(G)/v0.5.16/test/%s/Go", runtime.GOOS) + expected := fmt.Sprintf("Ethereum(G)/v0.5.16/test/%s/%s", runtime.GOOS, runtime.Version()) if clientString != expected { - t.Error("Expected clientIdentity to be %v, got %v", expected, clientString) + t.Errorf("Expected clientIdentity to be %q, got %q", expected, clientString) } customIdentifier := clientIdentity.GetCustomIdentifier() if customIdentifier != "test" { - t.Error("Expected clientIdentity.GetCustomIdentifier() to be 'test', got %v", customIdentifier) + t.Errorf("Expected clientIdentity.GetCustomIdentifier() to be 'test', got %q", customIdentifier) } clientIdentity.SetCustomIdentifier("test2") customIdentifier = clientIdentity.GetCustomIdentifier() if customIdentifier != "test2" { - t.Error("Expected clientIdentity.GetCustomIdentifier() to be 'test2', got %v", customIdentifier) + t.Errorf("Expected clientIdentity.GetCustomIdentifier() to be 'test2', got %q", customIdentifier) } clientString = clientIdentity.String() - expected = fmt.Sprintf("Ethereum(G)/v0.5.16/test2/%s/Go", runtime.GOOS) + expected = fmt.Sprintf("Ethereum(G)/v0.5.16/test2/%s/%s", runtime.GOOS, runtime.Version()) if clientString != expected { - t.Error("Expected clientIdentity to be %v, got %v", expected, clientString) + t.Errorf("Expected clientIdentity to be %q, got %q", expected, clientString) } }