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

Function TestCommandInvalidName

command_test.go:4996–5009  ·  command_test.go::TestCommandInvalidName
(t *testing.T)

Source from the content-addressed store, hash-verified

4994}
4995
4996func TestCommandInvalidName(t *testing.T) {
4997 var cmd Command
4998 assert.Equal(t, int64(0), cmd.Int64("foo"))
4999 assert.Equal(t, uint64(0), cmd.Uint64("foo"))
5000 assert.Equal(t, float64(0), cmd.Float("foo"))
5001 assert.Equal(t, "", cmd.String("foo"))
5002 assert.Equal(t, time.Time{}, cmd.Timestamp("foo"))
5003 assert.Equal(t, time.Duration(0), cmd.Duration("foo"))
5004
5005 assert.Equal(t, []int64(nil), cmd.Int64Slice("foo"))
5006 assert.Equal(t, []uint64(nil), cmd.Uint64Slice("foo"))
5007 assert.Equal(t, []float64(nil), cmd.FloatSlice("foo"))
5008 assert.Equal(t, []string(nil), cmd.StringSlice("foo"))
5009}
5010
5011func TestCommandCategories(t *testing.T) {
5012 var cc commandCategories = []*commandCategory{

Callers

nothing calls this directly

Calls 10

Int64Method · 0.95
Uint64Method · 0.95
FloatMethod · 0.95
StringMethod · 0.95
TimestampMethod · 0.95
DurationMethod · 0.95
Int64SliceMethod · 0.95
Uint64SliceMethod · 0.95
FloatSliceMethod · 0.95
StringSliceMethod · 0.95

Tested by

no test coverage detected