feat!: Drop returns bool, Put doesn't stack-overflow (#21)
All checks were successful
CI / Check PR Title (push) Has been skipped
CI / Go Lint (push) Successful in 58s
CI / Makefile Lint (push) Successful in 55s
CI / Markdown Lint (push) Successful in 34s
CI / Unit Tests (push) Successful in 54s
CI / Fuzz Tests (push) Successful in 1m26s
CI / Mutation Tests (push) Successful in 1m11s

## Description

Closes #11.

## Changes

### Design Decisions

## Checklist

- [ ] Tests pass
- [ ] Docs updated

Reviewed-on: #21
Co-authored-by: M.V. Hutz <git@maximhutz.me>
Co-committed-by: M.V. Hutz <git@maximhutz.me>
This commit was merged in pull request #21.
This commit is contained in:
2026-04-17 01:31:01 +00:00
committed by Maxim Hutz
parent 29ba6bfd4d
commit 39548b4332
6 changed files with 107 additions and 65 deletions

View File

@@ -68,12 +68,13 @@ func FuzzInsertLookup(f *testing.F) {
for _, step := range scenario.steps {
if step.drop {
err := actual.Drop(step.key)
assert.NoError(err)
ok := actual.Drop(step.key)
_, has := expected[step.key]
assert.Equal(ok, has)
delete(expected, step.key)
_, ok := actual.Get(step.key)
_, ok = actual.Get(step.key)
assert.False(ok)
} else {
err := actual.Put(step.key, step.value)