diff --git a/osu.Game/Tests/Beatmaps/BeatmapConversionTest.cs b/osu.Game/Tests/Beatmaps/BeatmapConversionTest.cs index b95173e44d..ff57ef41c5 100644 --- a/osu.Game/Tests/Beatmaps/BeatmapConversionTest.cs +++ b/osu.Game/Tests/Beatmaps/BeatmapConversionTest.cs @@ -43,14 +43,22 @@ protected void Test(string name) Assert.Fail($"A conversion did not generate any hitobjects, but should have, for hitobject at time: {expectedResult.Mappings[mappingCounter].StartTime}\n"); else if (mappingCounter >= expectedResult.Mappings.Count) Assert.Fail($"A conversion generated hitobjects, but should not have, for hitobject at time: {ourResult.Mappings[mappingCounter].StartTime}\n"); + else if (!expectedResult.Mappings[mappingCounter].Equals(ourResult.Mappings[mappingCounter])) + { + var expectedMapping = expectedResult.Mappings[mappingCounter]; + var ourMapping = ourResult.Mappings[mappingCounter]; + + Assert.Fail($"The conversion mapping differed for object at time {expectedMapping.StartTime}:\n" + + $"Expected {JsonConvert.SerializeObject(expectedMapping)}\n" + + $"Received: {JsonConvert.SerializeObject(ourMapping)}\n"); + } else { - var counter = mappingCounter; + var ourMapping = ourResult.Mappings[mappingCounter]; + var expectedMapping = expectedResult.Mappings[mappingCounter]; + Assert.Multiple(() => { - var ourMapping = ourResult.Mappings[counter]; - var expectedMapping = expectedResult.Mappings[counter]; - int objectCounter = 0; while (true) { @@ -62,10 +70,6 @@ protected void Test(string name) else if (objectCounter >= expectedMapping.Objects.Count) Assert.Fail($"The conversion generated a hitobject, but should not have, for hitobject at time: {ourMapping.StartTime}:\n" + $"Received: {JsonConvert.SerializeObject(ourMapping.Objects[objectCounter])}\n"); - else if (!expectedMapping.Equals(ourMapping)) - Assert.Fail($"The conversion mapping differed for object at time {expectedMapping.StartTime}:\n" - + $"Expected {JsonConvert.SerializeObject(expectedMapping)}\n" - + $"Received: {JsonConvert.SerializeObject(ourMapping)}\n"); else if (!expectedMapping.Objects[objectCounter].Equals(ourMapping.Objects[objectCounter])) { Assert.Fail($"The conversion generated differing hitobjects for object at time: {expectedMapping.StartTime}:\n"