Skip to content

Commit

Permalink
make unit tests resiliient even if you reduce NumChannels to 1, and M…
Browse files Browse the repository at this point in the history
…axClients to 1
  • Loading branch information
gafferongames committed Aug 30, 2024
1 parent c006f71 commit 5e7282a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,11 @@ void test_client_server_start_stop_restart()

for ( int iteration = 0; iteration < NumIterations; ++iteration )
{
yojimbo_assert( numClients[iteration] < MaxClients );
numClients[iteration] = numClients[iteration] % MaxClients;
if ( numClients[iteration] == 0 )
{
numClients[iteration] = 1;
}

server.Start( numClients[iteration] );

Expand Down

0 comments on commit 5e7282a

Please sign in to comment.