aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2014-10-30 01:39:51 +0800
committerFelix Lange <fjl@twurst.com>2014-10-30 01:39:51 +0800
commit38034c306693cd0acbc4edb0d0afde1f2e525bf6 (patch)
tree9a4c5b11dc52fb71a34c65f9c34ab7cf61861318
parent56014844a960ea59f18e3d6b4662a7674ac9c78d (diff)
downloadgo-tangerine-38034c306693cd0acbc4edb0d0afde1f2e525bf6.tar
go-tangerine-38034c306693cd0acbc4edb0d0afde1f2e525bf6.tar.gz
go-tangerine-38034c306693cd0acbc4edb0d0afde1f2e525bf6.tar.bz2
go-tangerine-38034c306693cd0acbc4edb0d0afde1f2e525bf6.tar.lz
go-tangerine-38034c306693cd0acbc4edb0d0afde1f2e525bf6.tar.xz
go-tangerine-38034c306693cd0acbc4edb0d0afde1f2e525bf6.tar.zst
go-tangerine-38034c306693cd0acbc4edb0d0afde1f2e525bf6.zip
ethwire: fix ClientIdentity test
-rw-r--r--ethwire/client_identity_test.go12
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)
}
}