Skip to content

Commit

Permalink
up: add more unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Oct 17, 2021
1 parent dfe4c47 commit 5f87df4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ func TestRgb2basic(t *testing.T) {
assert.Equal(t, uint8(46), Rgb2basic(57, 187, 226, true))
}

func TestHex2basic(t *testing.T) {
assert.Equal(t, uint8(105), Hex2basic("fd7cfc"))
}

func TestHslToRgb(t *testing.T) {
// red #ff0000 255,0,0 0,100%,50%
rgbVal := HslToRgb(0, 1, 0.5)
Expand Down

0 comments on commit 5f87df4

Please sign in to comment.