MCPcopy Index your code
hub / github.com/EngoEngine/engo / TestTMXBadObjectImageNotExist

Function TestTMXBadObjectImageNotExist

common/tmx_test.go:517–538  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

515}
516
517func TestTMXBadObjectImageNotExist(t *testing.T) {
518 buf := bytes.NewBuffer([]byte{})
519 tmpl, err := template.New("test").Parse(testTMXtmpl)
520 if err != nil {
521 t.Error("Error parsing tmx template")
522 }
523 err = tmpl.Execute(buf, tmxData{
524 Orientation: "orthogonal",
525 RenderOrder: "left-up",
526 ObjectImageTest: true,
527 ChunkData: true,
528 })
529 if err != nil {
530 t.Error("Error executing tmx template")
531 }
532
533 engo.Files.Unload("objimgtest.png")
534 err = engo.Files.LoadReaderData("test.tmx", buf)
535 if err == nil {
536 t.Error("Able to load tmx with bad object image layer extension")
537 }
538}
539
540func TestTMXAsset(t *testing.T) {
541 // Create an image in memory

Callers

nothing calls this directly

Calls 4

LoadReaderDataMethod · 0.80
UnloadMethod · 0.65
NewMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected