MCPcopy Index your code
hub / github.com/perkeep/perkeep / TestQueryPermanodeAttrExact

Function TestQueryPermanodeAttrExact

pkg/search/query_test.go:392–411  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

390}
391
392func TestQueryPermanodeAttrExact(t *testing.T) {
393 testQuery(t, func(qt *queryTest) {
394 id := qt.id
395
396 p1 := id.NewPlannedPermanode("1")
397 p2 := id.NewPlannedPermanode("2")
398 id.SetAttribute(p1, "someAttr", "value1")
399 id.SetAttribute(p2, "someAttr", "value2")
400
401 sq := &SearchQuery{
402 Constraint: &Constraint{
403 Permanode: &PermanodeConstraint{
404 Attr: "someAttr",
405 Value: "value1",
406 },
407 },
408 }
409 qt.wantRes(sq, p1)
410 })
411}
412
413func TestQueryPermanodeAttrMatches(t *testing.T) {
414 testQuery(t, func(qt *queryTest) {

Callers

nothing calls this directly

Calls 4

testQueryFunction · 0.85
NewPlannedPermanodeMethod · 0.80
SetAttributeMethod · 0.80
wantResMethod · 0.80

Tested by

no test coverage detected