(t *testing.T)
| 449 | } |
| 450 | |
| 451 | func TestTMXBadObjectImageExtension(t *testing.T) { |
| 452 | buf := bytes.NewBuffer([]byte{}) |
| 453 | tmpl, err := template.New("test").Parse(testTMXtmpl) |
| 454 | if err != nil { |
| 455 | t.Error("Error parsing tmx template") |
| 456 | } |
| 457 | err = tmpl.Execute(buf, tmxData{ |
| 458 | Orientation: "orthogonal", |
| 459 | RenderOrder: "left-down", |
| 460 | BadObjectImageExtension: ".test", |
| 461 | ChunkData: true, |
| 462 | }) |
| 463 | if err != nil { |
| 464 | t.Error("Error executing tmx template") |
| 465 | } |
| 466 | |
| 467 | engo.Files.Unload("test.png.test") |
| 468 | err = engo.Files.LoadReaderData("test.tmx", buf) |
| 469 | if err == nil { |
| 470 | t.Error("Able to load tmx with bad object image layer extension") |
| 471 | } |
| 472 | } |
| 473 | |
| 474 | func TestObjectImageNotExistTempFile(t *testing.T) { |
| 475 | imgbuf := bytes.NewBuffer([]byte{}) |
nothing calls this directly
no test coverage detected