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))
|
|
})
|
|
}
|
|
}
|