From e672b61fa2781fbedd6e005b9d19d9b817fd7d68 Mon Sep 17 00:00:00 2001 From: Andrew Bonventre Date: Thu, 13 Feb 2014 19:16:12 -0500 Subject: [PATCH] tidy up some correctness issues reported by go vet --- gossip/group_test.go | 4 ++-- gossip/info_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gossip/group_test.go b/gossip/group_test.go index 76a77aa5d925..4dd53efb6090 100644 --- a/gossip/group_test.go +++ b/gossip/group_test.go @@ -200,10 +200,10 @@ func TestGroups100Keys(t *testing.T) { for i := 0; i < 100; i++ { if infos[i].Key != minInfos[i].Key { - t.Errorf("key %d (%f != %f)", i, infos[i].Val, minInfos[i].Val) + t.Errorf("key %d (%s != %s)", i, infos[i].Key, minInfos[i].Key) } if infos[1000-100+i].Key != maxInfos[i].Key { - t.Errorf("key %d (%f != %f)", i, infos[1000-100+i].Val, maxInfos[i].Val) + t.Errorf("key %d (%s != %s)", i, infos[1000-100+i].Key, maxInfos[i].Key) } } } diff --git a/gossip/info_test.go b/gossip/info_test.go index f586f9e52354..a11a62def0d1 100644 --- a/gossip/info_test.go +++ b/gossip/info_test.go @@ -51,7 +51,7 @@ func TestSort(t *testing.T) { last := Float64Value(-math.MaxFloat64) for _, info := range infos { if info.Val.Less(last) { - t.Errorf("info val %f not increasing", info.Val) + t.Errorf("info val %v not increasing", info.Val) } last = info.Val.(Float64Value) } @@ -61,7 +61,7 @@ func TestSort(t *testing.T) { last = Float64Value(math.MaxFloat64) for _, info := range infos { if !info.Val.Less(last) { - t.Errorf("info val %f not decreasing", info.Val) + t.Errorf("info val %v not decreasing", info.Val) } last = info.Val.(Float64Value) }