@@ -59,8 +59,7 @@ func TestParticipants_All(t *testing.T) {
5959
6060 allPlayers := gs .Participants ().All ()
6161
62- assert .Len (t , allPlayers , 1 )
63- assert .Equal (t , pl , allPlayers [0 ])
62+ assert .ElementsMatch (t , []* common.Player {pl }, allPlayers )
6463}
6564
6665func TestParticipants_Playing (t * testing.T ) {
@@ -84,8 +83,7 @@ func TestParticipants_Playing(t *testing.T) {
8483 playing := gs .Participants ().Playing ()
8584
8685 assert .Len (t , playing , 2 )
87- assert .Equal (t , terrorist , playing [0 ])
88- assert .Equal (t , ct , playing [1 ])
86+ assert .ElementsMatch (t , []* common.Player {terrorist , ct }, playing )
8987}
9088
9189func TestParticipants_TeamMembers (t * testing.T ) {
@@ -106,10 +104,9 @@ func TestParticipants_TeamMembers(t *testing.T) {
106104 def := common .NewPlayer ()
107105 gs .playersByUserID [4 ] = def
108106
109- playing := gs .Participants ().TeamMembers (common .TeamCounterTerrorists )
107+ cts := gs .Participants ().TeamMembers (common .TeamCounterTerrorists )
110108
111- assert .Len (t , playing , 1 )
112- assert .Equal (t , ct , playing [0 ])
109+ assert .ElementsMatch (t , []* common.Player {ct }, cts )
113110}
114111
115112func TestParticipants_FindByHandle (t * testing.T ) {
0 commit comments