mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 03:58:55 +01:00
audio: Remove unnecessary sleepings
This commit is contained in:
parent
bd85d0e08d
commit
3ce8babd9b
@ -49,9 +49,6 @@ func TestGC(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
p.Play()
|
p.Play()
|
||||||
// 200[ms] should be enough all the bytes are consumed.
|
|
||||||
// TODO: This is a darty hack. Would it be possible to use virtual time?
|
|
||||||
time.Sleep(200 * time.Millisecond)
|
|
||||||
got = PlayersNumForTesting()
|
got = PlayersNumForTesting()
|
||||||
if want := 1; got != want {
|
if want := 1; got != want {
|
||||||
t.Errorf("PlayersNum() after Play: got: %d, want: %d", got, want)
|
t.Errorf("PlayersNum() after Play: got: %d, want: %d", got, want)
|
||||||
@ -99,9 +96,6 @@ func TestSameSourcePlayers(t *testing.T) {
|
|||||||
p0.Play()
|
p0.Play()
|
||||||
p1.Play()
|
p1.Play()
|
||||||
|
|
||||||
// 200[ms] should be enough all the bytes are consumed.
|
|
||||||
// TODO: This is a darty hack. Would it be possible to use virtual time?
|
|
||||||
time.Sleep(200 * time.Millisecond)
|
|
||||||
if err := UpdateForTesting(); err == nil {
|
if err := UpdateForTesting(); err == nil {
|
||||||
t.Errorf("got: nil, want: an error")
|
t.Errorf("got: nil, want: an error")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user