server/gamedata/information_test.go (875B)
1 package gamedata 2 3 import "testing" 4 5 func TestInformationItemsMatchOriginalPlacements(t *testing.T) { 6 guard := InformationItems[3221226422] 7 templates := make(map[uint32]bool) 8 9 if len(InformationItems) != 791 || guard.Template != 100280 || guard.Playfield != 950 || guard.Position != [3]float32{59.26055, 15.999946, 55.738785} { 10 t.Fatal("original information placements changed") 11 } 12 for id, placement := range InformationItems { 13 if id&65535 != placement.Playfield || ItemTemplates[placement.Template] == nil { 14 t.Fatal("information identity or template is not bound to its original playfield", id) 15 } 16 if _, known := Playfields[placement.Playfield]; !known { 17 t.Fatal("information object references an unknown playfield", id) 18 } 19 templates[placement.Template] = true 20 } 21 if len(templates) != 9 { 22 t.Fatal("original information template coverage changed") 23 } 24 }