TestInt32 tests the read and write of the int32 type.
(t *testing.T)
| 115 | |
| 116 | // TestInt32 tests the read and write of the int32 type. |
| 117 | func TestInt32(t *testing.T) { |
| 118 | b := NewBuffer() |
| 119 | err := b.WriteInt32(int32(-1), byte(10)) |
| 120 | if err != nil { |
| 121 | t.Error(err) |
| 122 | } |
| 123 | var data int32 |
| 124 | err = r(b).ReadInt32(&data, byte(10), true) |
| 125 | if err != nil { |
| 126 | t.Error(err) |
| 127 | } |
| 128 | if data != -1 { |
| 129 | t.Error("no eq.") |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | // TestInt32_2 tests the read and write of the int32 type. |
| 134 | func TestInt32_2(t *testing.T) { |
nothing calls this directly
no test coverage detected