MCPcopy
hub / github.com/spf13/viper / TestRecursiveAliases

Function TestRecursiveAliases

viper_test.go:846–852  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

844}
845
846func TestRecursiveAliases(t *testing.T) {
847 v := New()
848 v.Set("baz", "bat")
849 v.RegisterAlias("Baz", "Roo")
850 v.RegisterAlias("Roo", "baz")
851 assert.Equal(t, "bat", v.Get("Baz"))
852}
853
854func TestUnmarshal(t *testing.T) {
855 v := New()

Callers

nothing calls this directly

Calls 4

NewFunction · 0.85
RegisterAliasMethod · 0.80
GetMethod · 0.65
SetMethod · 0.45

Tested by

no test coverage detected