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

Function TestFilesLoadNoFileLoader

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

Source from the content-addressed store, hash-verified

136}
137
138func TestFilesLoadNoFileLoader(t *testing.T) {
139 expected := "no `FileLoader` associated with this extension:"
140 if err := Files.Load("test.wrongExtension"); err == nil {
141 t.Error("did not report loading file without an associated file loader")
142 } else if !strings.HasPrefix(err.Error(), expected) {
143 t.Errorf("wrong error returned loading file without an associated file loader. want: %v, got %v", expected, err.Error())
144 }
145}
146
147func TestFilesLoadReaderData(t *testing.T) {
148 Files.Register(".test", &testLoader{})

Callers

nothing calls this directly

Calls 2

LoadMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected