Package dmd implements well-known formats for dot-matrix display (DMD) art.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
589 B

package dmd
import (
"os"
"path/filepath"
"testing"
)
func TestReadColoring(t *testing.T) {
tests := []struct {
Name string
}{
{filepath.Join("vpin", "ID4_1.00.pal")},
{"smb.pal"},
}
for _, test := range tests {
t.Run(test.Name, func(it *testing.T) {
f, err := os.Open(filepath.Join("testdata", test.Name))
if err != nil {
it.Skip(err)
}
defer f.Close()
c, err := DecodePin2DMDColoring(f)
if err != nil {
it.Fatal(err)
}
it.Logf("%s: %d palettes, %d mappings, %d masks", f.Name(), len(c.Palettes), len(c.Mappings), len(c.Masks))
})
}
}