From f919f2252fb1314a99ddb8813b687a457644f448 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 21 Feb 2019 21:22:16 +0900 Subject: [PATCH 1/2] Add ToString for Judgements to ease debugging --- osu.Game/Rulesets/Judgements/Judgement.cs | 2 ++ osu.Game/Rulesets/Judgements/JudgementResult.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/osu.Game/Rulesets/Judgements/Judgement.cs b/osu.Game/Rulesets/Judgements/Judgement.cs index 7b5e70383c..e14eedd3dc 100644 --- a/osu.Game/Rulesets/Judgements/Judgement.cs +++ b/osu.Game/Rulesets/Judgements/Judgement.cs @@ -58,5 +58,7 @@ namespace osu.Game.Rulesets.Judgements /// The to find the numeric health increase for. /// The numeric health increase of . public double HealthIncreaseFor(JudgementResult result) => HealthIncreaseFor(result.Type); + + public override string ToString() => $"AffectsCombo:{AffectsCombo} MaxResult:{MaxResult} MaxScore:{MaxNumericResult}"; } } diff --git a/osu.Game/Rulesets/Judgements/JudgementResult.cs b/osu.Game/Rulesets/Judgements/JudgementResult.cs index b1950f330e..d4ef5750b1 100644 --- a/osu.Game/Rulesets/Judgements/JudgementResult.cs +++ b/osu.Game/Rulesets/Judgements/JudgementResult.cs @@ -55,5 +55,7 @@ namespace osu.Game.Rulesets.Judgements { Judgement = judgement; } + + public override string ToString() => $"{Type} (Score:{Judgement.NumericResultFor(this)} HP:{Judgement.HealthIncreaseFor(this)} {Judgement})"; } } From d4bdae4b042ecd6798a39eb30560d486caea3fa0 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Fri, 22 Feb 2019 16:59:52 +0900 Subject: [PATCH 2/2] Disable TestInstantPolling --- osu.Game.Tests/Visual/TestCasePollingComponent.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/osu.Game.Tests/Visual/TestCasePollingComponent.cs b/osu.Game.Tests/Visual/TestCasePollingComponent.cs index 68c44c7758..63f4f88948 100644 --- a/osu.Game.Tests/Visual/TestCasePollingComponent.cs +++ b/osu.Game.Tests/Visual/TestCasePollingComponent.cs @@ -56,6 +56,7 @@ namespace osu.Game.Tests.Visual }); [Test] + [Ignore("polling is threaded, and it's very hard to hook into it correctly")] public void TestInstantPolling() { createPoller(true); @@ -106,8 +107,11 @@ namespace osu.Game.Tests.Visual private void checkCount(int checkValue) { - Logger.Log($"value is {count}"); - AddAssert($"count is {checkValue}", () => count == checkValue); + AddAssert($"count is {checkValue}", () => + { + Logger.Log($"value is {count}"); + return count == checkValue; + }); } private void createPoller(bool instant) => AddStep("create poller", () =>