(t *testing.T)
| 352 | } |
| 353 | |
| 354 | func TestKVIncrDecr(t *testing.T) { |
| 355 | c := getTestConn() |
| 356 | |
| 357 | ctx := context.Background() |
| 358 | if n, err := c.Incr(ctx, "n").Result(); err != nil { |
| 359 | t.Error(err) |
| 360 | } else if n != 1 { |
| 361 | t.Error(n) |
| 362 | } |
| 363 | |
| 364 | if n, err := c.Incr(ctx, "n").Result(); err != nil { |
| 365 | t.Error(err) |
| 366 | } else if n != 2 { |
| 367 | t.Error(n) |
| 368 | } |
| 369 | |
| 370 | if n, err := c.Decr(ctx, "n").Result(); err != nil { |
| 371 | t.Error(err) |
| 372 | } else if n != 1 { |
| 373 | t.Error(n) |
| 374 | } |
| 375 | |
| 376 | if n, err := c.IncrBy(ctx, "n", 10).Result(); err != nil { |
| 377 | t.Error(err) |
| 378 | } else if n != 11 { |
| 379 | t.Error(n) |
| 380 | } |
| 381 | |
| 382 | if n, err := c.DecrBy(ctx, "n", 10).Result(); err != nil { |
| 383 | t.Error(err) |
| 384 | } else if n != 1 { |
| 385 | t.Error(n) |
| 386 | } |
| 387 | } |
| 388 | |
| 389 | func TestKVErrorParams(t *testing.T) { |
| 390 | c := getTestConn() |
nothing calls this directly
no test coverage detected