mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-15 03:20:30 +00:00
Mark the private property in the test case as non-null.
This commit is contained in:
@@ -14,7 +14,7 @@ namespace osu.Framework.Benchmarks
|
||||
[MemoryDiagnoser]
|
||||
public class BenchmarkBeginAbsoluteSequence : GameBenchmark
|
||||
{
|
||||
private TestGame game;
|
||||
private TestGame game = null!;
|
||||
|
||||
[Test]
|
||||
[Benchmark]
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
public class BenchmarkCompositeDrawableAllocations : GameBenchmark
|
||||
{
|
||||
private TestGame game;
|
||||
private TestGame game = null!;
|
||||
|
||||
[Test]
|
||||
[Benchmark]
|
||||
|
||||
@@ -18,9 +18,9 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
public class BenchmarkDependencyContainer : GameBenchmark
|
||||
{
|
||||
private Game game;
|
||||
private TestBdlReceiver bdlReceiver;
|
||||
private TestCachedReceiver cachedReceiver;
|
||||
private Game game = null!;
|
||||
private TestBdlReceiver bdlReceiver = null!;
|
||||
private TestCachedReceiver cachedReceiver = null!;
|
||||
|
||||
public override void SetUp()
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace osu.Framework.Benchmarks
|
||||
[MemoryDiagnoser]
|
||||
public class BenchmarkDrawableLoad : GameBenchmark
|
||||
{
|
||||
private TestGame game;
|
||||
private TestGame game = null!;
|
||||
|
||||
private const int nesting_level = 100;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
public class BenchmarkFillFlowContainerAllocations : GameBenchmark
|
||||
{
|
||||
private TestGame game;
|
||||
private TestGame game = null!;
|
||||
|
||||
[Benchmark]
|
||||
public void MultipleComputeLayoutPositions()
|
||||
|
||||
@@ -16,8 +16,8 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
public class BenchmarkFontLoading : BenchmarkTest
|
||||
{
|
||||
private NamespacedResourceStore<byte[]> baseResources;
|
||||
private TemporaryNativeStorage sharedTemp;
|
||||
private NamespacedResourceStore<byte[]> baseResources = null!;
|
||||
private TemporaryNativeStorage sharedTemp = null!;
|
||||
|
||||
public override void SetUp()
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace osu.Framework.Benchmarks
|
||||
public class BenchmarkHashing
|
||||
{
|
||||
private const string test_string = @"A string with reasonable length";
|
||||
private MemoryStream memoryStream;
|
||||
private MemoryStream memoryStream = null!;
|
||||
|
||||
[Benchmark]
|
||||
public string StringMD5() => test_string.ComputeMD5Hash();
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
public class BenchmarkLocalisableDescription
|
||||
{
|
||||
private LocalisableString[] descriptions;
|
||||
private LocalisableString[] descriptions = null!;
|
||||
|
||||
[Params(1, 10, 100, 1000)]
|
||||
public int Times { get; set; }
|
||||
|
||||
@@ -10,8 +10,8 @@ namespace osu.Framework.Benchmarks
|
||||
[MemoryDiagnoser]
|
||||
public class BenchmarkLocalisableString
|
||||
{
|
||||
private string string1;
|
||||
private string string2;
|
||||
private string string1 = null!;
|
||||
private string string2 = null!;
|
||||
private LocalisableString localisableString1;
|
||||
private LocalisableString localisableString2;
|
||||
private LocalisableString romanisableString1;
|
||||
|
||||
@@ -12,8 +12,8 @@ namespace osu.Framework.Benchmarks
|
||||
[MemoryDiagnoser]
|
||||
public class BenchmarkLocalisedBindableString
|
||||
{
|
||||
private LocalisationManager manager;
|
||||
private TemporaryNativeStorage storage;
|
||||
private LocalisationManager manager = null!;
|
||||
private TemporaryNativeStorage storage = null!;
|
||||
|
||||
[GlobalSetup]
|
||||
public void GlobalSetup()
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
public class BenchmarkManySpinningBoxes : GameBenchmark
|
||||
{
|
||||
private TestGame game;
|
||||
private TestGame game = null!;
|
||||
|
||||
[Test]
|
||||
[Benchmark]
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
public class BenchmarkScreenExtensions : GameBenchmark
|
||||
{
|
||||
private Screen testScreen;
|
||||
private Screen testScreen = null!;
|
||||
|
||||
[Test]
|
||||
[Benchmark]
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace osu.Framework.Benchmarks
|
||||
[MemoryDiagnoser]
|
||||
public class BenchmarkStreamExtensions
|
||||
{
|
||||
private MemoryStream memoryStream;
|
||||
private MemoryStream memoryStream = null!;
|
||||
|
||||
[Params(100, 10000, 1000000)]
|
||||
public int Length { get; set; }
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
public class BenchmarkTabletDriver : BenchmarkTest
|
||||
{
|
||||
private TabletDriver driver;
|
||||
private TabletDriver driver = null!;
|
||||
|
||||
public override void SetUp()
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
private readonly ITexturedGlyphLookupStore store = new TestStore();
|
||||
|
||||
private TextBuilder textBuilder;
|
||||
private TextBuilder textBuilder = null!;
|
||||
|
||||
[Benchmark]
|
||||
public void AddCharacters() => initialiseBuilder(false);
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
public class BenchmarkTransform : BenchmarkTest
|
||||
{
|
||||
private Drawable target;
|
||||
private Drawable target = null!;
|
||||
|
||||
public override void SetUp()
|
||||
{
|
||||
|
||||
@@ -11,8 +11,8 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
public class BenchmarkTransformUpdate : BenchmarkTest
|
||||
{
|
||||
private TestBox target;
|
||||
private TestBox targetNoTransforms;
|
||||
private TestBox target = null!;
|
||||
private TestBox targetNoTransforms = null!;
|
||||
|
||||
public override void SetUp()
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace osu.Framework.Benchmarks
|
||||
public int ItemCount { get; set; }
|
||||
|
||||
private readonly object[] objects = new object[1000];
|
||||
private WeakList<object> weakList;
|
||||
private WeakList<object> weakList = null!;
|
||||
|
||||
public override void SetUp()
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace osu.Framework.Benchmarks
|
||||
[MemoryDiagnoser]
|
||||
public abstract class GameBenchmark
|
||||
{
|
||||
private ManualGameHost gameHost;
|
||||
private ManualGameHost gameHost = null!;
|
||||
|
||||
protected Game Game { get; private set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user