(t *testing.T)
| 258 | } |
| 259 | |
| 260 | func TestHandleStore_ZeroValues(t *testing.T) { |
| 261 | hs := newHandleStore() |
| 262 | |
| 263 | // Test storing zero values |
| 264 | zeroValues := []interface{}{ |
| 265 | "", // empty string |
| 266 | 0, // zero int |
| 267 | false, // false bool |
| 268 | []int{}, // empty slice |
| 269 | map[int]int{}, // empty map |
| 270 | nil, // nil value |
| 271 | } |
| 272 | |
| 273 | for i, zeroValue := range zeroValues { |
| 274 | id := hs.Store(zeroValue) |
| 275 | value, ok := hs.Load(id) |
| 276 | assert.True(t, ok) |
| 277 | assert.Equal(t, zeroValue, value, "Zero value %d should be stored correctly", i) |
| 278 | assert.True(t, hs.Delete(id)) |
| 279 | } |
| 280 | } |
| 281 | |
| 282 | func TestHandleStore_FunctionTypes(t *testing.T) { |
| 283 | hs := newHandleStore() |
nothing calls this directly
no test coverage detected