(t *testing.T)
| 405 | } |
| 406 | |
| 407 | func TestTMXTileImageWrongFileType(t *testing.T) { |
| 408 | buf := bytes.NewBuffer([]byte{}) |
| 409 | tmpl, err := template.New("test").Parse(testTMXtmpl) |
| 410 | if err != nil { |
| 411 | t.Error("Error parsing tmx template") |
| 412 | } |
| 413 | err = tmpl.Execute(buf, tmxData{ |
| 414 | Orientation: "orthogonal", |
| 415 | RenderOrder: "right-down", |
| 416 | Tiles: true, |
| 417 | BadExtensions: ".test", |
| 418 | }) |
| 419 | if err != nil { |
| 420 | t.Error("Error executing tmx template") |
| 421 | } |
| 422 | |
| 423 | err = engo.Files.LoadReaderData("test.tmx", buf) |
| 424 | if err == nil { |
| 425 | t.Error("Able to load tmx when it contains bad image files") |
| 426 | } |
| 427 | } |
| 428 | |
| 429 | func TestTMXBadImageExtension(t *testing.T) { |
| 430 | buf := bytes.NewBuffer([]byte{}) |
nothing calls this directly
no test coverage detected