(t *testing.T)
| 171 | } |
| 172 | |
| 173 | func TestIncrementWithInt8(t *testing.T) { |
| 174 | tc := New(DefaultExpiration, 0) |
| 175 | tc.Set("tint8", int8(1), DefaultExpiration) |
| 176 | err := tc.Increment("tint8", 2) |
| 177 | if err != nil { |
| 178 | t.Error("Error incrementing:", err) |
| 179 | } |
| 180 | x, found := tc.Get("tint8") |
| 181 | if !found { |
| 182 | t.Error("tint8 was not found") |
| 183 | } |
| 184 | if x.(int8) != 3 { |
| 185 | t.Error("tint8 is not 3:", x) |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | func TestIncrementWithInt16(t *testing.T) { |
| 190 | tc := New(DefaultExpiration, 0) |