add some test code

This commit is contained in:
Shivaram Lingamneni 2018-04-26 23:32:27 -04:00
parent 1cb16094f0
commit c098b46276
4 changed files with 18 additions and 0 deletions

2
.gitignore vendored
View File

@ -88,3 +88,5 @@ _testmain.go
*.test
*.prof
# vim swapfiles
*.swp

9
.travis.gofmt.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
SOURCES="."
if [ -n "$(gofmt -s -l $SOURCES)" ]; then
echo "Go code is not formatted correctly with \`gofmt -s\`:"
gofmt -s -d $SOURCES
exit 1
fi

View File

@ -9,3 +9,4 @@ before_install:
script:
- gotestcover -coverprofile=cover.out ./...
- $HOME/gopath/bin/goveralls -service=travis-ci -coverprofile cover.out
- bash ./.travis.gofmt.sh

6
Makefile Normal file
View File

@ -0,0 +1,6 @@
test:
cd ircfmt && go test . && go vet .
cd ircmap && go test . && go vet .
cd ircmatch && go test . && go vet .
cd ircmsg && go test . && go vet .
cd ircutils && go test . && go vet .