github.com/panmari/cuckoofilter@v1.0.7-0.20231223155748-763d1d471ee8/bucket_test.go (about)

     1  package cuckoo
     2  
     3  import (
     4  	"reflect"
     5  	"testing"
     6  )
     7  
     8  func TestBucket_Reset(t *testing.T) {
     9  	var bkt bucket
    10  	for i := fingerprint(0); i < bucketSize; i++ {
    11  		bkt[i] = i
    12  	}
    13  	bkt.reset()
    14  
    15  	var want bucket
    16  	if !reflect.DeepEqual(bkt, want) {
    17  		t.Errorf("bucket.reset() got %v, want %v", bkt, want)
    18  	}
    19  }