gofmt -s decimal_test.go

This commit is contained in:
Victor Quinn 2017-02-15 19:08:34 -05:00
parent d48ced5acf
commit 4ec03b4267

View file

@ -165,10 +165,10 @@ func TestNewFromStringDeepEquals(t *testing.T) {
expected bool expected bool
} }
tests := []StrCmp{ tests := []StrCmp{
StrCmp{"1", "1", true}, {"1", "1", true},
StrCmp{"10", "10.0", true}, {"10", "10.0", true},
StrCmp{"1.1", "1.10", true}, {"1.1", "1.10", true},
StrCmp{"1.001", "1.01", false}, {"1.001", "1.01", false},
} }
for _, cmp := range tests { for _, cmp := range tests {
@ -741,19 +741,19 @@ func TestDecimal_QuoRem(t *testing.T) {
r string r string
} }
cases := []Inp4{ cases := []Inp4{
Inp4{"10", "1", 0, "10", "0"}, {"10", "1", 0, "10", "0"},
Inp4{"1", "10", 0, "0", "1"}, {"1", "10", 0, "0", "1"},
Inp4{"1", "4", 2, "0.25", "0"}, {"1", "4", 2, "0.25", "0"},
Inp4{"1", "8", 2, "0.12", "0.04"}, {"1", "8", 2, "0.12", "0.04"},
Inp4{"10", "3", 1, "3.3", "0.1"}, {"10", "3", 1, "3.3", "0.1"},
Inp4{"100", "3", 1, "33.3", "0.1"}, {"100", "3", 1, "33.3", "0.1"},
Inp4{"1000", "10", -3, "0", "1000"}, {"1000", "10", -3, "0", "1000"},
Inp4{"1e-3", "2e-5", 0, "50", "0"}, {"1e-3", "2e-5", 0, "50", "0"},
Inp4{"1e-3", "2e-3", 1, "0.5", "0"}, {"1e-3", "2e-3", 1, "0.5", "0"},
Inp4{"4e-3", "0.8", 4, "5e-3", "0"}, {"4e-3", "0.8", 4, "5e-3", "0"},
Inp4{"4.1e-3", "0.8", 3, "5e-3", "1e-4"}, {"4.1e-3", "0.8", 3, "5e-3", "1e-4"},
Inp4{"-4", "-3", 0, "1", "-1"}, {"-4", "-3", 0, "1", "-1"},
Inp4{"-4", "3", 0, "-1", "-1"}, {"-4", "3", 0, "-1", "-1"},
} }
for _, inp4 := range cases { for _, inp4 := range cases {