From c77e5884aad5528c54375a9a17ecf69b5070c399 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Wed, 13 Jul 2022 01:29:28 +0900 Subject: [PATCH] audio: change the naming convention: Num -> Count --- audio/audio_test.go | 10 +++++----- audio/export_test.go | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/audio/audio_test.go b/audio/audio_test.go index e31862d0b..74acec8c2 100644 --- a/audio/audio_test.go +++ b/audio/audio_test.go @@ -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 } diff --git a/audio/export_test.go b/audio/export_test.go index f25600862..ba316f8b3 100644 --- a/audio/export_test.go +++ b/audio/export_test.go @@ -140,7 +140,7 @@ func UpdateForTesting() error { return nil } -func PlayersNumForTesting() int { +func PlayersCountForTesting() int { c := CurrentContext() c.m.Lock() n := len(c.players)