diff --git a/osu.Framework.Tests/Bindables/AggregateBindableTest.cs b/osu.Framework.Tests/Bindables/AggregateBindableTest.cs index d74800a285d..ffbc9d9c76d 100644 --- a/osu.Framework.Tests/Bindables/AggregateBindableTest.cs +++ b/osu.Framework.Tests/Bindables/AggregateBindableTest.cs @@ -50,7 +50,7 @@ public void TestResultBounds() [Test] public void TestClassAggregate() { - var aggregate = new AggregateBindable((a, b) => new BoxedInt((a?.Value ?? 0) + (b?.Value ?? 0))); + var aggregate = new AggregateBindable((a, b) => new BoxedInt((a.Value) + (b.Value))); Assert.AreEqual(null, aggregate.Result.Value); diff --git a/osu.Framework.Tests/Bindables/BindableDoubleTest.cs b/osu.Framework.Tests/Bindables/BindableDoubleTest.cs index d0765118039..8840a734026 100644 --- a/osu.Framework.Tests/Bindables/BindableDoubleTest.cs +++ b/osu.Framework.Tests/Bindables/BindableDoubleTest.cs @@ -125,7 +125,7 @@ public void TestParsingNumberLocale(double value, string locale, string expected CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo(locale); var bindable = new BindableDouble(value); - string? asString = bindable.ToString(); + string asString = bindable.ToString(); Assert.AreEqual(expected, asString); Assert.DoesNotThrow(() => bindable.Parse(asString, CultureInfo.CurrentCulture)); Assert.AreEqual(value, bindable.Value, Precision.DOUBLE_EPSILON); diff --git a/osu.Framework.Tests/Bindables/BindableFloatTest.cs b/osu.Framework.Tests/Bindables/BindableFloatTest.cs index 200988ee85d..78792c2a97b 100644 --- a/osu.Framework.Tests/Bindables/BindableFloatTest.cs +++ b/osu.Framework.Tests/Bindables/BindableFloatTest.cs @@ -112,7 +112,7 @@ public void TestParsingNumberLocale(float value, string locale, string expected) CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo(locale); var bindable = new BindableFloat(value); - string? asString = bindable.ToString(); + string asString = bindable.ToString(); Assert.AreEqual(expected, asString); Assert.DoesNotThrow(() => bindable.Parse(asString, CultureInfo.CurrentCulture)); Assert.AreEqual(value, bindable.Value, Precision.FLOAT_EPSILON); diff --git a/osu.Framework.Tests/Bindables/BindableLeasingTest.cs b/osu.Framework.Tests/Bindables/BindableLeasingTest.cs index fc2323e67bd..4bb5419625d 100644 --- a/osu.Framework.Tests/Bindables/BindableLeasingTest.cs +++ b/osu.Framework.Tests/Bindables/BindableLeasingTest.cs @@ -95,7 +95,7 @@ public void TestDoubleLeaseFails() public void TestIncorrectEndLease() { // end a lease when no lease exists. - Assert.Throws(() => original.EndLease(null)); + Assert.Throws(() => original.EndLease(null!)); // end a lease with an incorrect bindable original.BeginLease(true); diff --git a/osu.Framework.Tests/Visual/Platform/FrameworkConfigVisualiser.cs b/osu.Framework.Tests/Visual/Platform/FrameworkConfigVisualiser.cs index 56701f67e57..3f263cd9911 100644 --- a/osu.Framework.Tests/Visual/Platform/FrameworkConfigVisualiser.cs +++ b/osu.Framework.Tests/Visual/Platform/FrameworkConfigVisualiser.cs @@ -59,6 +59,6 @@ protected override void LoadComplete() })); } - private void updateText() => valueText.Text = bindable.ToString() ?? ""; + private void updateText() => valueText.Text = bindable?.ToString() ?? ""; } }