Merge remote-tracking branch 'origin' into feat/safe-put
Some checks failed
CI / Check PR Title (pull_request) Successful in 31s
CI / Go Lint (pull_request) Successful in 52s
CI / Markdown Lint (pull_request) Successful in 34s
CI / Makefile Lint (pull_request) Successful in 50s
CI / Unit Tests (pull_request) Successful in 48s
CI / Fuzz Tests (pull_request) Failing after 41s
CI / Mutation Tests (pull_request) Successful in 1m3s
Some checks failed
CI / Check PR Title (pull_request) Successful in 31s
CI / Go Lint (pull_request) Successful in 52s
CI / Markdown Lint (pull_request) Successful in 34s
CI / Makefile Lint (pull_request) Successful in 50s
CI / Unit Tests (pull_request) Successful in 48s
CI / Fuzz Tests (pull_request) Failing after 41s
CI / Mutation Tests (pull_request) Successful in 1m3s
This commit is contained in:
@@ -56,7 +56,7 @@ func FuzzInsertLookup(f *testing.F) {
|
||||
fmt.Fprintf(os.Stderr, "seedA=%d seedB=%d capacity=%d growthFactor=%d\n",
|
||||
seedA, seedB, capacity, growthFactor)
|
||||
|
||||
actual := cuckoo.NewCustomTable[uint32, uint32](
|
||||
actual := cuckoo.NewCustom[uint32, uint32](
|
||||
offsetHash(seedA),
|
||||
offsetHash(seedB),
|
||||
func(a, b uint32) bool { return a == b },
|
||||
@@ -74,16 +74,16 @@ func FuzzInsertLookup(f *testing.F) {
|
||||
|
||||
delete(expected, step.key)
|
||||
|
||||
_, err := actual.Get(step.key)
|
||||
assert.Error(err)
|
||||
_, ok = actual.Get(step.key)
|
||||
assert.True(ok)
|
||||
} else {
|
||||
_, err := actual.Put(step.key, step.value)
|
||||
assert.NoError(err)
|
||||
|
||||
expected[step.key] = step.value
|
||||
|
||||
found, err := actual.Get(step.key)
|
||||
assert.NoError(err)
|
||||
found, ok := actual.Get(step.key)
|
||||
assert.True(ok)
|
||||
assert.Equal(step.value, found)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user