(t *testing.T)
| 1394 | } |
| 1395 | |
| 1396 | func TestObject_Iter(t *testing.T) { |
| 1397 | reporter := newMockReporter(t) |
| 1398 | |
| 1399 | m := map[string]interface{}{ |
| 1400 | "foo": 123.0, |
| 1401 | "bar": []interface{}{"456", 789.0}, |
| 1402 | } |
| 1403 | |
| 1404 | value := NewObject(reporter, m) |
| 1405 | |
| 1406 | it := value.Iter() |
| 1407 | |
| 1408 | assert.NotNil(t, it) |
| 1409 | assert.Equal(t, 2, len(it)) |
| 1410 | assert.Equal(t, it["foo"].value, value.Value("foo").Raw()) |
| 1411 | assert.Equal(t, it["bar"].value, value.Value("bar").Raw()) |
| 1412 | |
| 1413 | it["foo"].chain.assert(t, success) |
| 1414 | it["bar"].chain.assert(t, success) |
| 1415 | |
| 1416 | value.chain.assert(t, success) |
| 1417 | } |
| 1418 | |
| 1419 | func TestObject_Every(t *testing.T) { |
| 1420 | t.Run("check value", func(t *testing.T) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…