(t *testing.T)
| 153 | } |
| 154 | |
| 155 | func TestTMXTileNotLoadedFileNotExist(t *testing.T) { |
| 156 | // Ensure the file is not loaded |
| 157 | engo.Files.Unload("test.png") |
| 158 | |
| 159 | // Load the template |
| 160 | buf := bytes.NewBuffer([]byte{}) |
| 161 | tmpl, err := template.New("test").Parse(testTMXtmpl) |
| 162 | if err != nil { |
| 163 | t.Error("Error parsing tmx template") |
| 164 | } |
| 165 | err = tmpl.Execute(buf, tmxData{ |
| 166 | Orientation: "orthogonal", |
| 167 | RenderOrder: "right-up", |
| 168 | ChunkData: true, |
| 169 | }) |
| 170 | if err != nil { |
| 171 | t.Error("Error executing tmx template") |
| 172 | } |
| 173 | |
| 174 | // Load tmx |
| 175 | err = engo.Files.LoadReaderData("test.tmx", buf) |
| 176 | if err == nil { |
| 177 | t.Errorf("Unable to load tmx file from unloaded png. Error was: %v", err) |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | func TestTMXTileNotLoadedTempFile(t *testing.T) { |
| 182 | imgbuf := bytes.NewBuffer([]byte{}) |
nothing calls this directly
no test coverage detected