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

Function TestFilesLoadNotExist

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

Source from the content-addressed store, hash-verified

125}
126
127func TestFilesLoadNotExist(t *testing.T) {
128 Files.Register(".test", &testLoader{})
129
130 expected := "unable to open resource:"
131 if err := Files.Load("notExist.test"); err == nil {
132 t.Error("did not report loading non-existant file as an error")
133 } else if !strings.HasPrefix(err.Error(), expected) {
134 t.Errorf("wrong error returned loading non-existant file. want: %v, got: %v", expected, err.Error())
135 }
136}
137
138func TestFilesLoadNoFileLoader(t *testing.T) {
139 expected := "no `FileLoader` associated with this extension:"

Callers

nothing calls this directly

Calls 3

LoadMethod · 0.65
RegisterMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected