Skip to content

Commit

Permalink
Add feature for .NET 6+ Random methods and change #if to use it, #259
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirwin committed Jan 22, 2024
1 parent 5d70518 commit c553ccb
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<PropertyGroup Condition=" $(TargetFramework.StartsWith('net6.')) Or $(TargetFramework.StartsWith('net7.')) ">

<DefineConstants>$(DefineConstants);FEATURE_SPANFORMATTABLE</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_RANDOM_NEXTINT64_NEXTSINGLE</DefineConstants>

</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Lucene.Net.Tests/Util/Fst/Test2BFST.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Console = Lucene.Net.Util.SystemConsole;
using Int64 = J2N.Numerics.Int64;

#if !NET6_0_OR_GREATER
#if !FEATURE_RANDOM_NEXTINT64_NEXTSINGLE
using RandomizedTesting.Generators; // for Random.NextInt64 extension method
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/Lucene.Net.Tests/Util/Test2BPagedBytes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System;
using Assert = Lucene.Net.TestFramework.Assert;

#if !NET6_0_OR_GREATER
#if !FEATURE_RANDOM_NEXTINT64_NEXTSINGLE
using RandomizedTesting.Generators; // for Random.NextInt64 extension method
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/Lucene.Net.Tests/Util/TestMergedIterator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using JCG = J2N.Collections.Generic;
using Assert = Lucene.Net.TestFramework.Assert;

#if !NET6_0_OR_GREATER
#if !FEATURE_RANDOM_NEXTINT64_NEXTSINGLE
using RandomizedTesting.Generators; // for Random.NextInt64 extension method
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/Lucene.Net.Tests/Util/TestSetOnce.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Globalization;
using Assert = Lucene.Net.TestFramework.Assert;

#if !NET6_0_OR_GREATER
#if !FEATURE_RANDOM_NEXTINT64_NEXTSINGLE
using RandomizedTesting.Generators; // for Random.NextInt64 extension method
#endif

Expand Down

0 comments on commit c553ccb

Please sign in to comment.