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

Function TestQueryTwoConstraints

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

Source from the content-addressed store, hash-verified

267}
268
269func TestQueryTwoConstraints(t *testing.T) {
270 testQuery(t, func(qt *queryTest) {
271 id := qt.id
272 a := id.UploadString("a") // sha224-abd37534c7d9a2efb9465de931cd7055ffdb8879563ae98078d6d6d5
273 id.UploadString("b") // sha224-c681e18b81edaf2b66dd22376734dba5992e362bc3f91ab225854c17
274 id.UploadString("c4") // sha224-a71e32daa65b29de49a1497d23d47e663534a4cde5e329eda508d6f5
275
276 sq := &SearchQuery{
277 Constraint: &Constraint{
278 BlobRefPrefix: "sha224-a", // matches a and c4
279 BlobSize: &IntConstraint{ // matches a and b
280 Min: 1,
281 Max: 1,
282 },
283 },
284 }
285 qt.wantRes(sq, a)
286 })
287}
288
289func TestQueryLogicalOr(t *testing.T) {
290 testQuery(t, func(qt *queryTest) {

Callers

nothing calls this directly

Calls 3

testQueryFunction · 0.85
UploadStringMethod · 0.80
wantResMethod · 0.80

Tested by

no test coverage detected