(t *testing.T)
| 398 | } |
| 399 | |
| 400 | func TestIncrementFloatWithFloat64(t *testing.T) { |
| 401 | tc := New(DefaultExpiration, 0) |
| 402 | tc.Set("float64", float64(1.5), DefaultExpiration) |
| 403 | err := tc.IncrementFloat("float64", 2) |
| 404 | if err != nil { |
| 405 | t.Error("Error incrementfloating:", err) |
| 406 | } |
| 407 | x, found := tc.Get("float64") |
| 408 | if !found { |
| 409 | t.Error("float64 was not found") |
| 410 | } |
| 411 | if x.(float64) != 3.5 { |
| 412 | t.Error("float64 is not 3.5:", x) |
| 413 | } |
| 414 | } |
| 415 | |
| 416 | func TestDecrementWithInt(t *testing.T) { |
| 417 | tc := New(DefaultExpiration, 0) |
nothing calls this directly
no test coverage detected