(t *testing.T)
| 427 | } |
| 428 | |
| 429 | func TestTMXBadImageExtension(t *testing.T) { |
| 430 | buf := bytes.NewBuffer([]byte{}) |
| 431 | tmpl, err := template.New("test").Parse(testTMXtmpl) |
| 432 | if err != nil { |
| 433 | t.Error("Error parsing tmx template") |
| 434 | } |
| 435 | err = tmpl.Execute(buf, tmxData{ |
| 436 | Orientation: "orthogonal", |
| 437 | RenderOrder: "right-down", |
| 438 | Tiles: true, |
| 439 | BadImageExtension: ".test", |
| 440 | }) |
| 441 | if err != nil { |
| 442 | t.Error("Error executing tmx template") |
| 443 | } |
| 444 | |
| 445 | err = engo.Files.LoadReaderData("test.tmx", buf) |
| 446 | if err == nil { |
| 447 | t.Error("Able to load tmx with bad image layer extension") |
| 448 | } |
| 449 | } |
| 450 | |
| 451 | func TestTMXBadObjectImageExtension(t *testing.T) { |
| 452 | buf := bytes.NewBuffer([]byte{}) |
nothing calls this directly
no test coverage detected