1
0
forked from MTSR/mapserver

fix tests

This commit is contained in:
NatureFreshMilk 2019-02-01 14:14:21 +01:00
parent 320d8bf528
commit e544e20672
5 changed files with 11 additions and 3 deletions

2
server/.gitignore vendored
View File

@ -1,7 +1,7 @@
mapserver
world.mt
output
map.sqlite
/server/map.sqlite
mapserver.sqlite
mapserver.sqlite-journal
mapserver.json

BIN
server/map.sqlite Normal file

Binary file not shown.

View File

@ -54,7 +54,15 @@ func TestParse(t *testing.T) {
t.Error("Underground flag")
}
if len(mapblock.Mapdata) != 16384 {
if len(mapblock.Mapdata.ContentId) != 4096 {
t.Error("Mapdata length wrong")
}
if len(mapblock.Mapdata.Param2) != 4096 {
t.Error("Mapdata length wrong")
}
if len(mapblock.Mapdata.Param1) != 4096 {
t.Error("Mapdata length wrong")
}

View File

@ -39,7 +39,7 @@ func copy(src, dst string) error {
func CreateTestDatabase(filename string) error {
_, currentfilename, _, _ := runtime.Caller(0)
return copy(filepath.Dir(currentfilename)+"/testdata/map.sqlite", filename)
return copy(filepath.Dir(currentfilename)+"/testdata/map1.sqlite", filename)
}
//DB with metadata at 0,0,0

BIN
server/testutils/testdata/map1.sqlite vendored Normal file

Binary file not shown.