Skip to content

Commit

Permalink
Fix typo in viper_test.go: lagrenum → largenum
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyfok committed May 24, 2019
1 parent 7a605a5 commit 93066f9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions viper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ func TestWriteConfigYAML(t *testing.T) {
var yamlMergeExampleTgt = []byte(`
hello:
pop: 37890
lagrenum: 765432101234567
largenum: 765432101234567
num2pow63: 9223372036854775808
world:
- us
Expand All @@ -1128,7 +1128,7 @@ hello:
var yamlMergeExampleSrc = []byte(`
hello:
pop: 45000
lagrenum: 7654321001234567
largenum: 7654321001234567
universe:
- mw
- ad
Expand All @@ -1150,8 +1150,8 @@ func TestMergeConfig(t *testing.T) {
t.Fatalf("pop != 37890, = %d", pop)
}

if pop := v.GetInt64("hello.lagrenum"); pop != int64(765432101234567) {
t.Fatalf("int64 lagrenum != 765432101234567, = %d", pop)
if pop := v.GetInt64("hello.largenum"); pop != int64(765432101234567) {
t.Fatalf("int64 largenum != 765432101234567, = %d", pop)
}

if pop := v.GetUint("hello.pop"); pop != 37890 {
Expand Down Expand Up @@ -1186,8 +1186,8 @@ func TestMergeConfig(t *testing.T) {
t.Fatalf("pop != 45000, = %d", pop)
}

if pop := v.GetInt64("hello.lagrenum"); pop != int64(7654321001234567) {
t.Fatalf("int64 lagrenum != 7654321001234567, = %d", pop)
if pop := v.GetInt64("hello.largenum"); pop != int64(7654321001234567) {
t.Fatalf("int64 largenum != 7654321001234567, = %d", pop)
}

if world := v.GetStringSlice("hello.world"); len(world) != 4 {
Expand Down Expand Up @@ -1251,7 +1251,7 @@ func TestMergeConfigMap(t *testing.T) {
}

assert := func(i int) {
large := v.GetInt("hello.lagrenum")
large := v.GetInt("hello.largenum")
pop := v.GetInt("hello.pop")
if large != 765432101234567 {
t.Fatal("Got large num:", large)
Expand Down

0 comments on commit 93066f9

Please sign in to comment.