forked from MTSR/mapserver
test fixes
This commit is contained in:
parent
ef6ad8d151
commit
2b706f0fe7
@ -140,7 +140,7 @@ func (r *MapBlockRenderer) Render(pos1, pos2 *coords.MapBlockCoords) (*image.NRG
|
|||||||
c := r.colors.GetColor(nodeName)
|
c := r.colors.GetColor(nodeName)
|
||||||
hasfullpalette := nodeName == "unifiedbricks:brickblock"
|
hasfullpalette := nodeName == "unifiedbricks:brickblock"
|
||||||
|
|
||||||
if hasfullpalette {
|
if hasfullpalette && r.fullpalette != nil {
|
||||||
param2 := mb.GetParam2(x, y, z)
|
param2 := mb.GetParam2(x, y, z)
|
||||||
c = r.fullpalette.GetColor(param2)
|
c = r.fullpalette.GetColor(param2)
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ package tilerenderer
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"mapserver/colormapping"
|
"mapserver/colormapping"
|
||||||
"mapserver/coords"
|
"mapserver/coords"
|
||||||
@ -15,6 +14,8 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestTileRender(t *testing.T) {
|
func TestTileRender(t *testing.T) {
|
||||||
@ -45,7 +46,7 @@ func TestTileRender(t *testing.T) {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
r := mapblockrenderer.NewMapBlockRenderer(cache, c)
|
r := mapblockrenderer.NewMapBlockRenderer(cache, c, nil)
|
||||||
|
|
||||||
tiletmpdir, err := ioutil.TempDir("", "TestTileRenderTiles.*.sqlite")
|
tiletmpdir, err := ioutil.TempDir("", "TestTileRenderTiles.*.sqlite")
|
||||||
defer os.RemoveAll(tiletmpdir)
|
defer os.RemoveAll(tiletmpdir)
|
||||||
|
Loading…
Reference in New Issue
Block a user