From e6d6c4d9edb932ba321a776677aca36cf38c75d7 Mon Sep 17 00:00:00 2001 From: Fedor Korotkiy Date: Sun, 19 Jan 2020 01:59:27 +0300 Subject: [PATCH] Fix sum for 32-bit platform. --- sum/foo.go | 3 --- sum/sum.go | 2 +- sum/sum_test.go | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 sum/foo.go diff --git a/sum/foo.go b/sum/foo.go deleted file mode 100644 index 3b01770..0000000 --- a/sum/foo.go +++ /dev/null @@ -1,3 +0,0 @@ -// +build !change - -package sum diff --git a/sum/sum.go b/sum/sum.go index 5e2b0d8..cfe2f18 100644 --- a/sum/sum.go +++ b/sum/sum.go @@ -2,6 +2,6 @@ package sum -func Sum(a, b int) int { +func Sum(a, b int64) int64 { return 0 } diff --git a/sum/sum_test.go b/sum/sum_test.go index a31200c..0a65602 100644 --- a/sum/sum_test.go +++ b/sum/sum_test.go @@ -6,7 +6,7 @@ import ( ) type testCase struct { - a, b, sum int + a, b, sum int64 } func TestSum(t *testing.T) {