From b9d73bc1a496b03948ffb6540079cd522932db64 Mon Sep 17 00:00:00 2001 From: panmari Date: Mon, 13 Dec 2021 11:49:09 +0100 Subject: [PATCH] Making wordlist test less strict. Distributions ship with different wordlists, making this test break after updates and/or different machines. --- cuckoofilter_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cuckoofilter_test.go b/cuckoofilter_test.go index 204a114..3bf35e4 100644 --- a/cuckoofilter_test.go +++ b/cuckoofilter_test.go @@ -41,8 +41,8 @@ func TestInsertion(t *testing.T) { if got, want := cf.Count(), lineCount; got != want { t.Errorf("After inserting: Count() = %d, want %d", got, want) } - if got, want := cf.LoadFactor(), float64(0.097657); !cmp.Equal(got, want, optFloatNear) { - t.Errorf("After inserting: LoadFactor() = %f, want %f.", got, want) + if got, want := cf.LoadFactor(), float64(0.95); got >= want { + t.Errorf("After inserting: LoadFactor() = %f, want less than %f.", got, want) } for _, v := range values {