Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
- $HOME/gopath/bin/goveralls -service=travis-ci
- gometalinter ./...
4 changes: 4 additions & 0 deletions goauto.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
8 changes: 8 additions & 0 deletions goauto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}