(t *testing.T)
| 305 | } |
| 306 | |
| 307 | func TestOrderedMap_Copy(t *testing.T) { |
| 308 | t.Run("ReturnsEqualButNotSame", func(t *testing.T) { |
| 309 | key, value := 1, "a value" |
| 310 | m := orderedmap.NewOrderedMap() |
| 311 | m.Set(key, value) |
| 312 | |
| 313 | m2 := m.Copy() |
| 314 | m2.Set(key, "a different value") |
| 315 | |
| 316 | assert.Equal(t, m.Len(), m2.Len(), "not all elements are copied") |
| 317 | assert.Equal(t, value, m.GetElement(key).Value) |
| 318 | }) |
| 319 | } |
| 320 | |
| 321 | func TestGetElement(t *testing.T) { |
| 322 | t.Run("ReturnsElementForKey", func(t *testing.T) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…