Merge pull request #134 from mimiasd/fix-test

- fix some unit test
pull/137/head
Emir Pasic 4 years ago committed by GitHub
commit 80e934ed68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -125,7 +125,7 @@ func TestListSwap(t *testing.T) {
list.Add("b", "c")
list.Swap(0, 1)
if actualValue, ok := list.Get(0); actualValue != "b" || !ok {
t.Errorf("Got %v expected %v", actualValue, "c")
t.Errorf("Got %v expected %v", actualValue, "b")
}
}

@ -74,7 +74,7 @@ func TestToStringFloats(t *testing.T) {
if actualValue, expectedValue := ToString(value), "1.123456"; !strings.HasPrefix(actualValue, expectedValue) {
t.Errorf("Got %v expected %v", actualValue, expectedValue)
}
value = float32(1.123456)
value = float64(1.123456)
if actualValue, expectedValue := ToString(value), "1.123456"; !strings.HasPrefix(actualValue, expectedValue) {
t.Errorf("Got %v expected %v", actualValue, expectedValue)
}

Loading…
Cancel
Save