diff --git a/.travis.yml b/.travis.yml index 6681615..2c4d1f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,11 @@ language: go sudo: false go: - - 1.7.1 + - 1.7.3 before_install: - go get github.com/mattn/goveralls + - go get -u github.com/alecthomas/gometalinter + - gometalinter --install script: - - $HOME/gopath/bin/goveralls -service=travis-ci \ No newline at end of file + - $HOME/gopath/bin/goveralls -service=travis-ci + - gometalinter ./... \ No newline at end of file diff --git a/goauto.go b/goauto.go index 3f0b84f..caf7795 100644 --- a/goauto.go +++ b/goauto.go @@ -11,3 +11,7 @@ func AddThree(a, b, c int) int { func AddFour(a, b, c, d int) int { return a + b + c + d } + +func AddFive(a, b, c, d, e int) int { + return a + b + c + d + e +} diff --git a/goauto_test.go b/goauto_test.go index d96d882..878458d 100644 --- a/goauto_test.go +++ b/goauto_test.go @@ -26,4 +26,12 @@ func TestAddFour(t *testing.T) { if got != want { t.Errorf("got %d, want %d", got, want) } +} + +func TestAddFive(t *testing.T) { + got := AddFive(3, 7, 11, 13, 17) + want := 51 + if got != want { + t.Errorf("got %d, want %d", got, want) + } } \ No newline at end of file