From 08614e0941bc4f11556f7fe08df32fb03d775992 Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Thu, 24 Feb 2022 22:56:27 +0800 Subject: [PATCH] cleanup --- iterator_test.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/iterator_test.go b/iterator_test.go index 58a637a..6cfa8f1 100644 --- a/iterator_test.go +++ b/iterator_test.go @@ -17,10 +17,8 @@ func TestMakePaths(t *testing.T) { for i := 0; i < 4; i++ { nbins := uint(1) << i paths := iter.MakePaths(prefix, nbins) - t.Log(paths) if len(paths) != int(nbins) { - t.Logf("failed: TestMakePaths") - t.Error("wrong number of paths", len(paths)) + t.Errorf("wrong number of paths; expected %d, have %d", nbins, len(paths)) } } } @@ -83,8 +81,7 @@ func TestIterator(t *testing.T) { iters := iter.SubtrieIterators(tree, nbins) ix := 0 for b := uint(0); b < nbins; b++ { - it := iters[b] - for ; it.Next(true); ix++ { + for it := iters[b]; it.Next(true); ix++ { if !bytes.Equal(allPaths[ix], it.Path()) { t.Fatalf("wrong path value\nexpected:\t%v\nactual:\t\t%v", allPaths[ix], it.Path())