diff --git a/.travis.yml b/.travis.yml index b6f1536..7df6721 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,5 +3,8 @@ language: go go: - 1.9 +script: + - go test -coverprofile=coverage.txt -covermode=atomic + after_success: - bash <(curl -s https://codecov.io/bash) \ No newline at end of file diff --git a/hsva_test.go b/hsva_test.go index dcfc1e5..2f4e353 100644 --- a/hsva_test.go +++ b/hsva_test.go @@ -24,6 +24,13 @@ func TestConversionGray(t *testing.T) { if err := eq(black1, black2); err != nil { t.Fatal(err) } + + var gray1 color.Color = hsva{h: 1.0, s: 0.0, v: 0.8, a: uint8(255)} + var gray2 color.Color = color.RGBA{R: uint8(204), G: uint8(204), B: uint8(204), A: uint8(255)} + + if err := eq(gray1, gray2); err != nil { + t.Fatal(err) + } } func TestConversionRGB(t *testing.T) {