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

Function TestStringMap_Serialized_Set

flag_test.go:2442–2452  ·  flag_test.go::TestStringMap_Serialized_Set
(t *testing.T)

Source from the content-addressed store, hash-verified

2440}
2441
2442func TestStringMap_Serialized_Set(t *testing.T) {
2443 m0 := NewStringMap(map[string]string{"a": "b"})
2444 ser0 := m0.Serialize()
2445
2446 require.GreaterOrEqual(t, len(ser0), len(slPfx), "serialized shorter than expected")
2447
2448 m1 := NewStringMap(map[string]string{"c": "d"})
2449 _ = m1.Set(ser0)
2450
2451 require.Equal(t, m0.String(), m1.String(), "pre and post serialization do not match")
2452}
2453
2454var timestampFlagTests = []struct {
2455 name string

Callers

nothing calls this directly

Calls 3

SerializeMethod · 0.65
SetMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected