feat: wider fuzz tests, stronger options. #9

Merged
mvhutz merged 5 commits from fix/infinite-put-glitch into main 2026-03-25 01:26:57 +00:00
Showing only changes of commit a815b49b66 - Show all commits

View File

@@ -40,6 +40,9 @@ func Capacity(value int) Option {
// MinimumLoad modifies the [DefaultMinimumLoad] of the [Table]. The value must // MinimumLoad modifies the [DefaultMinimumLoad] of the [Table]. The value must
// be between 0.00 and 1.00. // be between 0.00 and 1.00.
//
// The higher the minimum load, the more likely that a [Table.Put] will not
// succeed. Minimum loads above 20% are not tested.
func MinimumLoad(value float64) Option { func MinimumLoad(value float64) Option {
if value < 0.00 || value > 1.00 { if value < 0.00 || value > 1.00 {
panic(fmt.Sprintf("go-cuckoo: MinimumLoad must be between 0.00 and 1.00, got %f", value)) panic(fmt.Sprintf("go-cuckoo: MinimumLoad must be between 0.00 and 1.00, got %f", value))