Skip to content

Commit 5f87df4

Browse files
committed
up: add more unit tests
1 parent dfe4c47 commit 5f87df4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

convert_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ func TestRgb2basic(t *testing.T) {
1313
assert.Equal(t, uint8(46), Rgb2basic(57, 187, 226, true))
1414
}
1515

16+
func TestHex2basic(t *testing.T) {
17+
assert.Equal(t, uint8(105), Hex2basic("fd7cfc"))
18+
}
19+
1620
func TestHslToRgb(t *testing.T) {
1721
// red #ff0000 255,0,0 0,100%,50%
1822
rgbVal := HslToRgb(0, 1, 0.5)

0 commit comments

Comments
 (0)