MCPcopy
hub / github.com/urfave/cli / TestParseMultiFloat64

Function TestParseMultiFloat64

flag_test.go:2174–2185  ·  flag_test.go::TestParseMultiFloat64
(t *testing.T)

Source from the content-addressed store, hash-verified

2172}
2173
2174func TestParseMultiFloat64(t *testing.T) {
2175 _ = (&Command{
2176 Flags: []Flag{
2177 &FloatFlag{Name: "serve", Aliases: []string{"s"}},
2178 },
2179 Action: func(_ context.Context, cmd *Command) error {
2180 assert.Equal(t, 10.2, cmd.Float("serve"), "main name not set")
2181 assert.Equal(t, 10.2, cmd.Float("s"), "short name not set")
2182 return nil
2183 },
2184 }).Run(buildTestContext(t), []string{"run", "-s", "10.2"})
2185}
2186
2187func TestParseDestinationFloat64(t *testing.T) {
2188 var dest float64

Callers

nothing calls this directly

Calls 3

buildTestContextFunction · 0.85
FloatMethod · 0.80
RunMethod · 0.45

Tested by

no test coverage detected