Skip to content

Commit 3c53379

Browse files
authored
Report all error logs on TestPair dispose (space-wizards#6503)
* Report all error logs on TestPair dispose * Reduce, reuse, recycle
1 parent a8f723f commit 3c53379

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

Robust.UnitTesting/Pool/TestPair.Recycle.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,11 @@ private void ReportErrorLogs()
2222
{
2323
using (Assert.EnterMultipleScope())
2424
{
25-
if (ServerLogHandler.FailingLogs.Count == 1)
26-
Assert.Fail(ServerLogHandler.FailingLogs[0]);
27-
else if (ServerLogHandler.FailingLogs.Count > 1)
28-
Assert.Fail("Server had multiple failing logs reported, consult the game log.");
25+
foreach (var log in ServerLogHandler.FailingLogs)
26+
Assert.Fail(log);
2927

30-
if (ClientLogHandler.FailingLogs.Count == 1)
31-
Assert.Fail(ClientLogHandler.FailingLogs[0]);
32-
else if (ClientLogHandler.FailingLogs.Count > 1)
33-
Assert.Fail("Client had multiple failing logs reported, consult the game log.");
28+
foreach (var log in ClientLogHandler.FailingLogs)
29+
Assert.Fail(log);
3430
}
3531
}
3632

0 commit comments

Comments
 (0)