diff options
author | Felix Lange <fjl@twurst.com> | 2014-10-30 01:39:51 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2014-10-30 01:39:51 +0800 |
commit | 38034c306693cd0acbc4edb0d0afde1f2e525bf6 (patch) | |
tree | 9a4c5b11dc52fb71a34c65f9c34ab7cf61861318 /ethwire/client_identity_test.go | |
parent | 56014844a960ea59f18e3d6b4662a7674ac9c78d (diff) | |
download | dexon-38034c306693cd0acbc4edb0d0afde1f2e525bf6.tar dexon-38034c306693cd0acbc4edb0d0afde1f2e525bf6.tar.gz dexon-38034c306693cd0acbc4edb0d0afde1f2e525bf6.tar.bz2 dexon-38034c306693cd0acbc4edb0d0afde1f2e525bf6.tar.lz dexon-38034c306693cd0acbc4edb0d0afde1f2e525bf6.tar.xz dexon-38034c306693cd0acbc4edb0d0afde1f2e525bf6.tar.zst dexon-38034c306693cd0acbc4edb0d0afde1f2e525bf6.zip |
ethwire: fix ClientIdentity test
Diffstat (limited to 'ethwire/client_identity_test.go')
-rw-r--r-- | ethwire/client_identity_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ethwire/client_identity_test.go b/ethwire/client_identity_test.go index f3c8bfd50..1724fe57b 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) } } |