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

Function TestFilesSetRoot

assets_test.go:22–37  ·  view source on GitHub ↗

TestSetRoot makes sure set root sets Files.root to the proper value.

(t *testing.T)

Source from the content-addressed store, hash-verified

20
21// TestSetRoot makes sure set root sets Files.root to the proper value.
22func TestFilesSetRoot(t *testing.T) {
23 // Start an instance of engo
24 Run(RunOptions{
25 NoRun: true,
26 HeadlessMode: true,
27 }, &assetTestScene{})
28
29 Files.SetRoot("testing")
30 if Files.root != "testing" {
31 t.Errorf("Root was not set to %v, it was %v instead", "testing", Files.root)
32 }
33
34 if Files.GetRoot() != "testing" {
35 t.Errorf("Root was set, but GetRoot() did not return proper value. Wanted: %v, got: %v", "testing", Files.GetRoot())
36 }
37}
38
39type testLoader struct{}
40

Callers

nothing calls this directly

Calls 3

RunFunction · 0.85
GetRootMethod · 0.80
SetRootMethod · 0.65

Tested by

no test coverage detected