MCPcopy
hub / github.com/EngoEngine/engo / TestFilesUnloadNoFileLoader

Function TestFilesUnloadNoFileLoader

assets_test.go:173–180  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

171}
172
173func TestFilesUnloadNoFileLoader(t *testing.T) {
174 expected := "no `FileLoader` associated with this extension:"
175 if err := Files.Unload("test.wrongExtension"); err == nil {
176 t.Error("did not report error unloading without an associated file loader")
177 } else if !strings.HasPrefix(err.Error(), expected) {
178 t.Errorf("wrong error returned unloading without an associated file loader. want: %v, got: %v", expected, err.Error())
179 }
180}
181
182func TestFilesResource(t *testing.T) {
183 Files.Register(".test", &testLoader{})

Callers

nothing calls this directly

Calls 2

UnloadMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected