(t *testing.T)
| 203 | } |
| 204 | |
| 205 | func TestIncrementWithInt32(t *testing.T) { |
| 206 | tc := New(DefaultExpiration, 0) |
| 207 | tc.Set("tint32", int32(1), DefaultExpiration) |
| 208 | err := tc.Increment("tint32", 2) |
| 209 | if err != nil { |
| 210 | t.Error("Error incrementing:", err) |
| 211 | } |
| 212 | x, found := tc.Get("tint32") |
| 213 | if !found { |
| 214 | t.Error("tint32 was not found") |
| 215 | } |
| 216 | if x.(int32) != 3 { |
| 217 | t.Error("tint32 is not 3:", x) |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | func TestIncrementWithInt64(t *testing.T) { |
| 222 | tc := New(DefaultExpiration, 0) |