MCPcopy Index your code
hub / github.com/docker/cli / TestPositiveDurationOptSetAndValue

Function TestPositiveDurationOptSetAndValue

opts/duration_test.go:25–30  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

23}
24
25func TestPositiveDurationOptSetAndValue(t *testing.T) {
26 var duration PositiveDurationOpt
27 assert.NilError(t, duration.Set("300s"))
28 assert.Check(t, is.Equal(time.Duration(300*10e8), *duration.Value()))
29 assert.Error(t, duration.Set("-300s"), "duration cannot be negative")
30}

Callers

nothing calls this directly

Calls 3

SetMethod · 0.95
ValueMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…