1
0
forked from MTSR/mapserver
mapserver/colormapping/colormapping_test.go

29 lines
416 B
Go
Raw Normal View History

2019-01-11 12:49:19 +03:00
package colormapping
import (
"testing"
)
func TestNewMapping(t *testing.T) {
2019-01-13 18:37:03 +03:00
m := NewColorMapping()
2019-02-08 12:30:44 +03:00
_, err := m.LoadVFSColors(false, "/colors.txt")
2019-01-13 18:37:03 +03:00
if err != nil {
t.Fatal(err)
}
2019-01-11 13:23:50 +03:00
2019-06-20 08:14:14 +03:00
c := m.GetColor("scifi_nodes:blacktile2", 0)
2019-01-13 18:37:03 +03:00
if c == nil {
panic("no color")
}
2019-01-11 13:23:50 +03:00
2019-06-20 08:14:14 +03:00
c = m.GetColor("default:river_water_flowing", 0)
2019-02-27 18:24:53 +03:00
if c == nil {
panic("no color")
}
2019-02-28 22:20:59 +03:00
//if c.A != 128 {
// panic("wrong alpha")
//}
2019-02-27 18:24:53 +03:00
2019-01-11 12:49:19 +03:00
}