(t *testing.T)
| 455 | assert.Equal(t, n, mv.Val()["k1"].Value()) |
| 456 | } |
| 457 | func TestMapBoolValue(t *testing.T) { |
| 458 | |
| 459 | mbv := map[string]bool{"k1": true} |
| 460 | v := NewMapBoolValue(mbv) |
| 461 | _, ok := v.Get("k1") |
| 462 | assert.True(t, ok) |
| 463 | _, ok = v.Get("nope") |
| 464 | assert.Equal(t, false, ok) |
| 465 | assert.Equal(t, 1, v.MapValue().Len()) |
| 466 | lv := v.SliceValue() |
| 467 | assert.Equal(t, 1, len(lv)) |
| 468 | |
| 469 | mv := v.MapValue() |
| 470 | assert.Equal(t, 1, mv.Len()) |
| 471 | assert.Equal(t, true, mv.Val()["k1"].Value()) |
| 472 | } |
nothing calls this directly
no test coverage detected