(t *testing.T)
| 427 | } |
| 428 | |
| 429 | func TestQueryTypeStringer(t *testing.T) { |
| 430 | Convey("Query type stringer should return expected string", t, func() { |
| 431 | var cases = [...]struct { |
| 432 | i fmt.Stringer |
| 433 | s string |
| 434 | }{ |
| 435 | { |
| 436 | i: ReadQuery, |
| 437 | s: "read", |
| 438 | }, { |
| 439 | i: WriteQuery, |
| 440 | s: "write", |
| 441 | }, { |
| 442 | i: QueryType(0xffff), |
| 443 | s: "unknown", |
| 444 | }, |
| 445 | } |
| 446 | for _, v := range cases { |
| 447 | So(v.s, ShouldEqual, fmt.Sprintf("%v", v.i)) |
| 448 | } |
| 449 | }) |
| 450 | } |
| 451 | |
| 452 | func benchmarkEnc(b *testing.B, v interface{}) { |
| 453 | var ( |
nothing calls this directly
no test coverage detected