MCPcopy Create free account
hub / github.com/docker/cli / TestDurationOptSetAndValue

Function TestDurationOptSetAndValue

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

Source from the content-addressed store, hash-verified

15}
16
17func TestDurationOptSetAndValue(t *testing.T) {
18 var duration DurationOpt
19 assert.NilError(t, duration.Set("300s"))
20 assert.Check(t, is.Equal(time.Duration(300*10e8), *duration.Value()))
21 assert.NilError(t, duration.Set("-300s"))
22 assert.Check(t, is.Equal(time.Duration(-300*10e8), *duration.Value()))
23}
24
25func TestPositiveDurationOptSetAndValue(t *testing.T) {
26 var duration PositiveDurationOpt

Callers

nothing calls this directly

Calls 2

SetMethod · 0.95
ValueMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…