(t *testing.T)
| 638 | } |
| 639 | |
| 640 | func TestDecrementFloatWithFloat64(t *testing.T) { |
| 641 | tc := New(DefaultExpiration, 0) |
| 642 | tc.Set("float64", float64(5.5), DefaultExpiration) |
| 643 | err := tc.DecrementFloat("float64", 2) |
| 644 | if err != nil { |
| 645 | t.Error("Error decrementing:", err) |
| 646 | } |
| 647 | x, found := tc.Get("float64") |
| 648 | if !found { |
| 649 | t.Error("float64 was not found") |
| 650 | } |
| 651 | if x.(float64) != 3.5 { |
| 652 | t.Error("float64 is not 3:", x) |
| 653 | } |
| 654 | } |
| 655 | |
| 656 | func TestIncrementInt(t *testing.T) { |
| 657 | tc := New(DefaultExpiration, 0) |
nothing calls this directly
no test coverage detected