From 1ca7f24137d5a46192348fe2d6fbe77db5e9c050 Mon Sep 17 00:00:00 2001 From: Bjoern Rabenstein Date: Tue, 19 Aug 2014 18:30:55 +0200 Subject: [PATCH] Remove float diff tolerance altogether. Change-Id: I9ea9683a4665d5800fca75560bb4b8a8b4406d55 --- storage/local/storage_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/storage/local/storage_test.go b/storage/local/storage_test.go index 7ea0c8d9a..23bee2505 100644 --- a/storage/local/storage_test.go +++ b/storage/local/storage_test.go @@ -2,7 +2,6 @@ package storage_ng import ( "fmt" - "math" "math/rand" "testing" "testing/quick" @@ -434,7 +433,7 @@ func verifyStorage(t *testing.T, s Storage, samples clientmodel.Samples, r *rand } want := float64(sample.Value) got := float64(found[0].Value) - if want != got && (want == 0. || math.Abs(want-got)/want > 0.000001) { + if want != got { t.Errorf("Value mismatch, want %f, got %f.", want, got) result = false }