(t *testing.T)
| 187 | } |
| 188 | |
| 189 | func TestIncrementWithInt16(t *testing.T) { |
| 190 | tc := New(DefaultExpiration, 0) |
| 191 | tc.Set("tint16", int16(1), DefaultExpiration) |
| 192 | err := tc.Increment("tint16", 2) |
| 193 | if err != nil { |
| 194 | t.Error("Error incrementing:", err) |
| 195 | } |
| 196 | x, found := tc.Get("tint16") |
| 197 | if !found { |
| 198 | t.Error("tint16 was not found") |
| 199 | } |
| 200 | if x.(int16) != 3 { |
| 201 | t.Error("tint16 is not 3:", x) |
| 202 | } |
| 203 | } |
| 204 | |
| 205 | func TestIncrementWithInt32(t *testing.T) { |
| 206 | tc := New(DefaultExpiration, 0) |