From 3ba27e24d33ff91a9a61fe26859c430103678023 Mon Sep 17 00:00:00 2001 From: yuanjin Date: Mon, 13 Jan 2020 10:23:14 +0800 Subject: [PATCH 1/2] - fix utils test --- utils/utils_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/utils_test.go b/utils/utils_test.go index f5b3edc..afbca1b 100644 --- a/utils/utils_test.go +++ b/utils/utils_test.go @@ -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) } From edc20eca0a6fa0fc1971971fc8b118d866a0b0f6 Mon Sep 17 00:00:00 2001 From: yuanjin Date: Mon, 13 Jan 2020 17:12:56 +0800 Subject: [PATCH 2/2] - fix arraylist test --- lists/arraylist/arraylist_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lists/arraylist/arraylist_test.go b/lists/arraylist/arraylist_test.go index 0d7eae4..63d97d4 100644 --- a/lists/arraylist/arraylist_test.go +++ b/lists/arraylist/arraylist_test.go @@ -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") } }