(t *testing.T)
| 382 | } |
| 383 | |
| 384 | func TestIncrementFloatWithFloat32(t *testing.T) { |
| 385 | tc := New(DefaultExpiration, 0) |
| 386 | tc.Set("float32", float32(1.5), DefaultExpiration) |
| 387 | err := tc.IncrementFloat("float32", 2) |
| 388 | if err != nil { |
| 389 | t.Error("Error incrementfloating:", err) |
| 390 | } |
| 391 | x, found := tc.Get("float32") |
| 392 | if !found { |
| 393 | t.Error("float32 was not found") |
| 394 | } |
| 395 | if x.(float32) != 3.5 { |
| 396 | t.Error("float32 is not 3.5:", x) |
| 397 | } |
| 398 | } |
| 399 | |
| 400 | func TestIncrementFloatWithFloat64(t *testing.T) { |
| 401 | tc := New(DefaultExpiration, 0) |
nothing calls this directly
no test coverage detected