(t *testing.T)
| 358 | } |
| 359 | |
| 360 | func TestOrderedMap_Has(t *testing.T) { |
| 361 | t.Run("ReturnsFalseIfKeyDoesNotExist", func(t *testing.T) { |
| 362 | m := orderedmap.NewOrderedMap() |
| 363 | assert.False(t, m.Has("foo")) |
| 364 | }) |
| 365 | |
| 366 | t.Run("ReturnsTrueIfKeyExists", func(t *testing.T) { |
| 367 | m := orderedmap.NewOrderedMap() |
| 368 | m.Set("foo", "bar") |
| 369 | assert.True(t, m.Has("foo")) |
| 370 | }) |
| 371 | |
| 372 | t.Run("KeyDoesNotExistAfterDelete", func(t *testing.T) { |
| 373 | m := orderedmap.NewOrderedMap() |
| 374 | m.Set("foo", "bar") |
| 375 | m.Delete("foo") |
| 376 | assert.False(t, m.Has("foo")) |
| 377 | }) |
| 378 | } |
| 379 | |
| 380 | func benchmarkMap_Set(multiplier int) func(b *testing.B) { |
| 381 | return func(b *testing.B) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…