mirror of
https://github.com/nikdoof/vsphere-influxdb-go.git
synced 2025-12-20 22:19:23 +00:00
add vendoring with go dep
This commit is contained in:
29
vendor/github.com/influxdata/influxdb/pkg/bloom/bloom_test.go
generated
vendored
Normal file
29
vendor/github.com/influxdata/influxdb/pkg/bloom/bloom_test.go
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
package bloom_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/influxdata/influxdb/pkg/bloom"
|
||||
)
|
||||
|
||||
// Ensure filter can insert values and verify they exist.
|
||||
func TestFilter_InsertContains(t *testing.T) {
|
||||
f := bloom.NewFilter(1000, 4)
|
||||
|
||||
// Insert value and validate.
|
||||
f.Insert([]byte("Bess"))
|
||||
if !f.Contains([]byte("Bess")) {
|
||||
t.Fatal("expected true")
|
||||
}
|
||||
|
||||
// Insert another value and test.
|
||||
f.Insert([]byte("Emma"))
|
||||
if !f.Contains([]byte("Emma")) {
|
||||
t.Fatal("expected true")
|
||||
}
|
||||
|
||||
// Validate that a non-existent value doesn't exist.
|
||||
if f.Contains([]byte("Jane")) {
|
||||
t.Fatal("expected false")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user