Commit b2f8c78e authored by santiaago's avatar santiaago
Browse files

Test FillFromRGBA

parent f1a99ab4
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -60,6 +60,14 @@ func TestColorByPercentage(t *testing.T) {
	}
}

func TestFillFromRGBA(t *testing.T) {

	expected := "fill:rgb(255,245,249)"
	if s := FillFromRGBA(c1); s != expected {
		t.Errorf("expected ", expected, "got", s)
	}
}

func contains(a []color.RGBA, e color.RGBA) bool {
	for _, v := range a {
		if v == e {