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

Function TestAliasesOfAliases

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

Source from the content-addressed store, hash-verified

836}
837
838func TestAliasesOfAliases(t *testing.T) {
839 v := New()
840 v.Set("Title", "Checking Case")
841 v.RegisterAlias("Foo", "Bar")
842 v.RegisterAlias("Bar", "Title")
843 assert.Equal(t, "Checking Case", v.Get("FOO"))
844}
845
846func TestRecursiveAliases(t *testing.T) {
847 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