mirror of https://github.com/spf13/viper.git
Fix typo in viper_test.go: lagrenum → largenum
This commit is contained in:
parent
7a605a50e6
commit
93066f92c6
|
@ -1116,7 +1116,7 @@ func TestWriteConfigYAML(t *testing.T) {
|
||||||
var yamlMergeExampleTgt = []byte(`
|
var yamlMergeExampleTgt = []byte(`
|
||||||
hello:
|
hello:
|
||||||
pop: 37890
|
pop: 37890
|
||||||
lagrenum: 765432101234567
|
largenum: 765432101234567
|
||||||
num2pow63: 9223372036854775808
|
num2pow63: 9223372036854775808
|
||||||
world:
|
world:
|
||||||
- us
|
- us
|
||||||
|
@ -1128,7 +1128,7 @@ hello:
|
||||||
var yamlMergeExampleSrc = []byte(`
|
var yamlMergeExampleSrc = []byte(`
|
||||||
hello:
|
hello:
|
||||||
pop: 45000
|
pop: 45000
|
||||||
lagrenum: 7654321001234567
|
largenum: 7654321001234567
|
||||||
universe:
|
universe:
|
||||||
- mw
|
- mw
|
||||||
- ad
|
- ad
|
||||||
|
@ -1150,8 +1150,8 @@ func TestMergeConfig(t *testing.T) {
|
||||||
t.Fatalf("pop != 37890, = %d", pop)
|
t.Fatalf("pop != 37890, = %d", pop)
|
||||||
}
|
}
|
||||||
|
|
||||||
if pop := v.GetInt64("hello.lagrenum"); pop != int64(765432101234567) {
|
if pop := v.GetInt64("hello.largenum"); pop != int64(765432101234567) {
|
||||||
t.Fatalf("int64 lagrenum != 765432101234567, = %d", pop)
|
t.Fatalf("int64 largenum != 765432101234567, = %d", pop)
|
||||||
}
|
}
|
||||||
|
|
||||||
if pop := v.GetUint("hello.pop"); pop != 37890 {
|
if pop := v.GetUint("hello.pop"); pop != 37890 {
|
||||||
|
@ -1186,8 +1186,8 @@ func TestMergeConfig(t *testing.T) {
|
||||||
t.Fatalf("pop != 45000, = %d", pop)
|
t.Fatalf("pop != 45000, = %d", pop)
|
||||||
}
|
}
|
||||||
|
|
||||||
if pop := v.GetInt64("hello.lagrenum"); pop != int64(7654321001234567) {
|
if pop := v.GetInt64("hello.largenum"); pop != int64(7654321001234567) {
|
||||||
t.Fatalf("int64 lagrenum != 7654321001234567, = %d", pop)
|
t.Fatalf("int64 largenum != 7654321001234567, = %d", pop)
|
||||||
}
|
}
|
||||||
|
|
||||||
if world := v.GetStringSlice("hello.world"); len(world) != 4 {
|
if world := v.GetStringSlice("hello.world"); len(world) != 4 {
|
||||||
|
@ -1251,7 +1251,7 @@ func TestMergeConfigMap(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
assert := func(i int) {
|
assert := func(i int) {
|
||||||
large := v.GetInt("hello.lagrenum")
|
large := v.GetInt("hello.largenum")
|
||||||
pop := v.GetInt("hello.pop")
|
pop := v.GetInt("hello.pop")
|
||||||
if large != 765432101234567 {
|
if large != 765432101234567 {
|
||||||
t.Fatal("Got large num:", large)
|
t.Fatal("Got large num:", large)
|
||||||
|
|
Loading…
Reference in New Issue