TestInt16_2 tests the read and write of the int16 type.
(t *testing.T)
| 98 | |
| 99 | // TestInt16_2 tests the read and write of the int16 type. |
| 100 | func TestInt16_2(t *testing.T) { |
| 101 | b := NewBuffer() |
| 102 | err := b.WriteInt16(int16(-1), byte(0)) |
| 103 | if err != nil { |
| 104 | t.Error(err) |
| 105 | } |
| 106 | var data int16 |
| 107 | err = r(b).ReadInt16(&data, byte(0), true) |
| 108 | if err != nil { |
| 109 | t.Error(err) |
| 110 | } |
| 111 | if data != int16(-1) { |
| 112 | t.Error("no eq.", data) |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | // TestInt32 tests the read and write of the int32 type. |
| 117 | func TestInt32(t *testing.T) { |
nothing calls this directly
no test coverage detected