(t *testing.T)
| 287 | } |
| 288 | |
| 289 | func TestQueryLogicalOr(t *testing.T) { |
| 290 | testQuery(t, func(qt *queryTest) { |
| 291 | id := qt.id |
| 292 | |
| 293 | // foo is sha224-0808f64e60d58979fcb676c96ec938270dea42445aeefcd3a4e6f8db |
| 294 | _, foo := id.UploadFile("file.txt", "foo", time.Unix(1382073153, 0)) |
| 295 | // bar is sha224-07daf010de7f7f0d8d76a76eb8d1eb40182c8d1e7a3877a6686c9bf0 |
| 296 | _, bar := id.UploadFile("file.txt", "bar", time.Unix(1382073153, 0)) |
| 297 | |
| 298 | sq := &SearchQuery{ |
| 299 | Constraint: &Constraint{ |
| 300 | Logical: &LogicalConstraint{ |
| 301 | Op: "or", |
| 302 | A: &Constraint{ |
| 303 | BlobRefPrefix: "sha224-08", |
| 304 | }, |
| 305 | B: &Constraint{ |
| 306 | BlobRefPrefix: "sha224-07", |
| 307 | }, |
| 308 | }, |
| 309 | }, |
| 310 | } |
| 311 | qt.wantRes(sq, foo, bar) |
| 312 | }) |
| 313 | } |
| 314 | |
| 315 | func TestQueryLogicalAnd(t *testing.T) { |
| 316 | testQuery(t, func(qt *queryTest) { |
nothing calls this directly
no test coverage detected