(t *testing.T)
| 654 | } |
| 655 | |
| 656 | func TestIncrementInt(t *testing.T) { |
| 657 | tc := New(DefaultExpiration, 0) |
| 658 | tc.Set("tint", 1, DefaultExpiration) |
| 659 | n, err := tc.IncrementInt("tint", 2) |
| 660 | if err != nil { |
| 661 | t.Error("Error incrementing:", err) |
| 662 | } |
| 663 | if n != 3 { |
| 664 | t.Error("Returned number is not 3:", n) |
| 665 | } |
| 666 | x, found := tc.Get("tint") |
| 667 | if !found { |
| 668 | t.Error("tint was not found") |
| 669 | } |
| 670 | if x.(int) != 3 { |
| 671 | t.Error("tint is not 3:", x) |
| 672 | } |
| 673 | } |
| 674 | |
| 675 | func TestIncrementInt8(t *testing.T) { |
| 676 | tc := New(DefaultExpiration, 0) |
nothing calls this directly
no test coverage detected