From 248dff8fda0d51effbc7a24188eba9bf96b0393f Mon Sep 17 00:00:00 2001 From: Memek Date: Thu, 2 Mar 2023 17:47:25 +0100 Subject: [PATCH] BenchmarkBase fixed to cover case when BockSize is 0. --- Recyclable.Collections.Benchmarks/BenchmarkBase.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Recyclable.Collections.Benchmarks/BenchmarkBase.cs b/Recyclable.Collections.Benchmarks/BenchmarkBase.cs index 8dd01ee..4b49a48 100644 --- a/Recyclable.Collections.Benchmarks/BenchmarkBase.cs +++ b/Recyclable.Collections.Benchmarks/BenchmarkBase.cs @@ -13,8 +13,8 @@ namespace Recyclable.Collections.Benchmarks { 0 => 1, > 0 and <= 10 => TestObjectCount, - _ => TestObjectCount / Divider - }; + _ => TestObjectCount / Divider > 0 ? TestObjectCount / Divider : TestObjectCount + }; protected object[]? _testObjects; protected object[] TestObjects => _testObjects ?? throw new NullReferenceException("Something is wrong and the field is not initialized");