(t *testing.T)
| 313 | } |
| 314 | |
| 315 | func TestTMXTileImages(t *testing.T) { |
| 316 | imgbuf := bytes.NewBuffer([]byte{}) |
| 317 | img := image.NewRGBA(image.Rect(0, 0, 132, 99)) |
| 318 | err := png.Encode(imgbuf, img) |
| 319 | if err != nil { |
| 320 | t.Errorf("Unable to encode png from image") |
| 321 | } |
| 322 | |
| 323 | buf := bytes.NewBuffer([]byte{}) |
| 324 | tmpl, err := template.New("test").Parse(testTMXtmpl) |
| 325 | if err != nil { |
| 326 | t.Error("Error parsing tmx template") |
| 327 | } |
| 328 | err = tmpl.Execute(buf, tmxData{ |
| 329 | Orientation: "orthogonal", |
| 330 | RenderOrder: "left-up", |
| 331 | Tiles: true, |
| 332 | }) |
| 333 | if err != nil { |
| 334 | t.Error("Error executing tmx template") |
| 335 | } |
| 336 | |
| 337 | err = engo.Files.LoadReaderData("test.tmx", buf) |
| 338 | if err != nil { |
| 339 | t.Errorf("Unable to load tmx file for testing. Error was: %v", err) |
| 340 | } |
| 341 | } |
| 342 | |
| 343 | func TestTMXTileImagesNotLoadedFileNotExist(t *testing.T) { |
| 344 | buf := bytes.NewBuffer([]byte{}) |
nothing calls this directly
no test coverage detected