Skip to content

Commit 40e1c3f

Browse files
committed
Add test
1 parent ba8ba81 commit 40e1c3f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎munsell_test.go‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,13 @@ func TestMatchFromHexPurple(t *testing.T) {
9595
t.Errorf("Expected Purple, received %v", color)
9696
}
9797
}
98+
99+
func TestMatchFromHexShorthand(t *testing.T) {
100+
color, err := munsell.GetColorFromHex("#f00")
101+
if err != nil {
102+
t.Errorf("Expected color, received %v", err)
103+
}
104+
if color != munsell.Red {
105+
t.Errorf("Expected Red, received %v", color)
106+
}
107+
}

0 commit comments

Comments
 (0)