Skip to content

Commit

Permalink
🐛 fix unit test failers, add travis build config
Browse files Browse the repository at this point in the history
  • Loading branch information
noelyahan committed Sep 24, 2018
1 parent adf78b3 commit 4bfb7bb
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ dist
!testdata/**/*.jpg
!testdata/**/*.gif
!testdata/**/*.png
!logo/**/*.png
!logo/**/*.png
coverage.txt
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
language: go

sudo: false

go:
- "1.10"

script:
- go test -v -coverprofile=coverage.txt -covermode=atomic

after_success:
- bash <(curl -s https://codecov.io/bash)

branches:
only:
- master

notifications:
email: false
2 changes: 1 addition & 1 deletion crop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestCropWithNegativeBounds(t *testing.T) {
imgs := getImages("T")
_, err := Crop(imgs[0], image.Pt(-10, -10), image.Pt(-1, -1))
if err == nil {
t.Errorf("Expect error got ", err)
t.Errorf("Expect error got [%v]", err)
return
}
}
Expand Down
2 changes: 1 addition & 1 deletion image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestWithURLs(t *testing.T) {
for _, test := range tests {
img, err := mergi.Import(loader.NewFileImporter(test.in))

if err != nil {
if err == nil {
t.Error("Error", err)
} else {
mergi.Export(loader.NewFileExporter(img, "out.png"))
Expand Down

0 comments on commit 4bfb7bb

Please sign in to comment.