mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
audio: No need goroutine for tests
This commit is contained in:
parent
ed7552962d
commit
7740656054
@ -71,9 +71,6 @@ func TestGC(t *testing.T) {
|
|||||||
p = nil
|
p = nil
|
||||||
runtime.GC()
|
runtime.GC()
|
||||||
|
|
||||||
ch := make(chan struct{})
|
|
||||||
go func() {
|
|
||||||
defer close(ch)
|
|
||||||
for i := 0; i < 10; i++ {
|
for i := 0; i < 10; i++ {
|
||||||
got = PlayersNumForTesting()
|
got = PlayersNumForTesting()
|
||||||
if want := 0; got == want {
|
if want := 0; got == want {
|
||||||
@ -84,7 +81,4 @@ func TestGC(t *testing.T) {
|
|||||||
time.Sleep(100 * time.Millisecond)
|
time.Sleep(100 * time.Millisecond)
|
||||||
}
|
}
|
||||||
t.Errorf("time out")
|
t.Errorf("time out")
|
||||||
}()
|
|
||||||
|
|
||||||
<-ch
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user