(t *testing.T)
| 39 | } |
| 40 | |
| 41 | func TestEncodePackedBool(t *testing.T) { |
| 42 | dest := make([]byte, 5) |
| 43 | enc := csproto.NewEncoder(dest) |
| 44 | enc.EncodePackedBool(1, []bool{true, false, true}) |
| 45 | |
| 46 | expected := []byte{ |
| 47 | // tag=1, wire type=2 |
| 48 | 0x0a, |
| 49 | // total length (3) |
| 50 | 0x03, |
| 51 | // true, false, true |
| 52 | 0x01, 0x00, 0x01, |
| 53 | } |
| 54 | assert.Equal(t, expected, dest) |
| 55 | } |
| 56 | |
| 57 | func TestEncodeString(t *testing.T) { |
| 58 | cases := []struct { |
nothing calls this directly
no test coverage detected