MCPcopy Create free account
hub / github.com/distributedio/titan / TestStringDecr

Function TestStringDecr

command/strings_test.go:422–433  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

420}
421
422func TestStringDecr(t *testing.T) {
423 args := make([]string, 1)
424 args[0] = "decr"
425 ctx := ContextTest("decr", args...)
426 Call(ctx)
427 assert.Contains(t, ctxString(ctx.Out), "-1")
428
429 args[0] = "setex"
430 ctx = ContextTest("decr", args...)
431 Call(ctx)
432 assert.Contains(t, ctxString(ctx.Out), ErrInteger.Error())
433}
434
435func TestStringDecrBy(t *testing.T) {
436 args := make([]string, 2)

Callers

nothing calls this directly

Calls 4

ContextTestFunction · 0.85
CallFunction · 0.85
ctxStringFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected