(t *testing.T)
| 155 | } |
| 156 | |
| 157 | func TestIncrementWithInt(t *testing.T) { |
| 158 | tc := New(DefaultExpiration, 0) |
| 159 | tc.Set("tint", 1, DefaultExpiration) |
| 160 | err := tc.Increment("tint", 2) |
| 161 | if err != nil { |
| 162 | t.Error("Error incrementing:", err) |
| 163 | } |
| 164 | x, found := tc.Get("tint") |
| 165 | if !found { |
| 166 | t.Error("tint was not found") |
| 167 | } |
| 168 | if x.(int) != 3 { |
| 169 | t.Error("tint is not 3:", x) |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | func TestIncrementWithInt8(t *testing.T) { |
| 174 | tc := New(DefaultExpiration, 0) |