find a permanode (p2) that has a property being a blobref pointing to a sub-query
(t *testing.T)
| 491 | // find a permanode (p2) that has a property being a blobref pointing |
| 492 | // to a sub-query |
| 493 | func TestQueryPermanodeAttrValueInSet(t *testing.T) { |
| 494 | testQuery(t, func(qt *queryTest) { |
| 495 | id := qt.id |
| 496 | |
| 497 | p1 := id.NewPlannedPermanode("1") |
| 498 | id.SetAttribute(p1, "bar", "baz") |
| 499 | p2 := id.NewPlannedPermanode("2") |
| 500 | id.SetAttribute(p2, "foo", p1.String()) |
| 501 | |
| 502 | sq := &SearchQuery{ |
| 503 | Constraint: &Constraint{ |
| 504 | Permanode: &PermanodeConstraint{ |
| 505 | Attr: "foo", |
| 506 | ValueInSet: &Constraint{ |
| 507 | Permanode: &PermanodeConstraint{ |
| 508 | Attr: "bar", |
| 509 | Value: "baz", |
| 510 | }, |
| 511 | }, |
| 512 | }, |
| 513 | }, |
| 514 | } |
| 515 | qt.wantRes(sq, p2) |
| 516 | }) |
| 517 | } |
| 518 | |
| 519 | // Tests PermanodeConstraint.ValueMatchesInt. |
| 520 | func TestQueryPermanodeValueMatchesInt(t *testing.T) { |
nothing calls this directly
no test coverage detected