Backend: Add tests for pkg/colors/lightmap.go

This commit is contained in:
Theresa Gresch 2020-04-28 14:50:39 +02:00
parent f99542e91e
commit c5a371ed18

View file

@ -1,10 +1,18 @@
package colors
import (
"github.com/stretchr/testify/assert"
"strconv"
"testing"
)
func TestLightMap_Hex(t *testing.T) {
lum := []Luminance{1, 16, 2, 4, 15, 16, 1, 0, 8}
lMap := LightMap(lum)
assert.Equal(t, "11024F10108", lMap.Hex())
}
func TestLightMap_Diff(t *testing.T) {
t.Run("random", func(t *testing.T) {
lum := []Luminance{1, 16, 2, 4, 15, 16, 1, 0, 8}