mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
audio: change the naming convention: Num -> Count
This commit is contained in:
parent
5f17264c74
commit
c77e5884aa
@ -40,15 +40,15 @@ func TestGC(t *testing.T) {
|
||||
defer teardown()
|
||||
|
||||
p, _ := context.NewPlayer(bytes.NewReader(make([]byte, 4)))
|
||||
got := audio.PlayersNumForTesting()
|
||||
got := audio.PlayersCountForTesting()
|
||||
if want := 0; got != want {
|
||||
t.Errorf("PlayersNum(): got: %d, want: %d", got, want)
|
||||
t.Errorf("PlayersCountForTesting(): got: %d, want: %d", got, want)
|
||||
}
|
||||
|
||||
p.Play()
|
||||
got = audio.PlayersNumForTesting()
|
||||
got = audio.PlayersCountForTesting()
|
||||
if want := 1; got != want {
|
||||
t.Errorf("PlayersNum() after Play: got: %d, want: %d", got, want)
|
||||
t.Errorf("PlayersCountForTesting() after Play: got: %d, want: %d", got, want)
|
||||
}
|
||||
|
||||
runtime.KeepAlive(p)
|
||||
@ -56,7 +56,7 @@ func TestGC(t *testing.T) {
|
||||
runtime.GC()
|
||||
|
||||
for i := 0; i < 10; i++ {
|
||||
got = audio.PlayersNumForTesting()
|
||||
got = audio.PlayersCountForTesting()
|
||||
if want := 0; got == want {
|
||||
return
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ func UpdateForTesting() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func PlayersNumForTesting() int {
|
||||
func PlayersCountForTesting() int {
|
||||
c := CurrentContext()
|
||||
c.m.Lock()
|
||||
n := len(c.players)
|
||||
|
Loading…
Reference in New Issue
Block a user