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

Function TestAudioPlayerURL

common/audio_test.go:217–229  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

215}
216
217func TestAudioPlayerURL(t *testing.T) {
218 engo.Files.SetRoot("testdata")
219 if err := engo.Files.Load("1.ogg"); err != nil {
220 t.Errorf("Could not load file. Error was: %v\n", err)
221 }
222 p, err := LoadedPlayer("1.ogg")
223 if err != nil {
224 t.Errorf("Could not get player. Error was: %v\n", err)
225 }
226 if p.URL() != "1.ogg" {
227 t.Errorf("Wrong URL reported from player. Wanted: %v\nGot: %v\n", "1.ogg", p.URL())
228 }
229}
230
231func TestAudioPlayerClose(t *testing.T) {
232 engo.Files.SetRoot("testdata")

Callers

nothing calls this directly

Calls 4

LoadedPlayerFunction · 0.85
SetRootMethod · 0.65
LoadMethod · 0.65
URLMethod · 0.65

Tested by

no test coverage detected