Skip to content

Commit 48efa2f

Browse files
authored
Merge pull request #130 from cdonnellytx/fix/net8OrGreater
fix: use NET8_0_OR_GREATER for ifdefs
2 parents b9f6eef + c7a1359 commit 48efa2f

File tree

57 files changed

+88
-88
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+88
-88
lines changed

Code/Light.GuardClauses.Tests/CommonAssertions/IsApproximatelyTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static void FloatWithDefaultTolerance(float first, float second, bool exp
4141
public static void FloatWithCustomTolerance(float first, float second, float tolerance, bool expected) =>
4242
first.IsApproximately(second, tolerance).Should().Be(expected);
4343

44-
#if NET8_0
44+
#if NET8_0_OR_GREATER
4545
[Theory]
4646
[InlineData(1.1, 1.3, 0.5, true)]
4747
[InlineData(100.55, 100.555, 0.00001, false)]

Code/Light.GuardClauses.Tests/CommonAssertions/IsGreaterThanOrApproximatelyTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static void FloatWithDefaultTolerance(float first, float second, bool exp
3737
public static void FloatWIthCustomTolerance(float first, float second, float tolerance, bool expected) =>
3838
first.IsGreaterThanOrApproximately(second, tolerance).Should().Be(expected);
3939

40-
#if NET8_0
40+
#if NET8_0_OR_GREATER
4141
[Theory]
4242
[InlineData(15.91, 15.9, 0.1, true)]
4343
[InlineData(24.449, 24.45, 0.0001, false)]

Code/Light.GuardClauses.Tests/CommonAssertions/IsLessThanOrApproximatelyTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static void FloatWithDefaultTolerance(float first, float second, bool exp
3737
public static void FloatWithCustomTolerance(float first, float second, float tolerance, bool expected) =>
3838
first.IsLessThanOrApproximately(second, tolerance).Should().Be(expected);
3939

40-
#if NET8_0
40+
#if NET8_0_OR_GREATER
4141
[Theory]
4242
[InlineData(13.25, 13.5, 0.1, true)] // Less than case
4343
[InlineData(13.5, 13.5, 0.1, true)] // Equal case

Code/Light.GuardClauses.Tests/ComparableAssertions/MustBeApproximatelyTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using FluentAssertions;
33
using Xunit;
44

@@ -178,7 +178,7 @@ public static void CallerArgumentExpressionWithTolerance_Float()
178178
.WithParameterName(nameof(pi));
179179
}
180180

181-
#if NET8_0
181+
#if NET8_0_OR_GREATER
182182
[Theory]
183183
[InlineData(5.1, 5.0, 0.2)]
184184
[InlineData(10.3, 10.3, 0.01)]

Code/Light.GuardClauses.Tests/ComparableAssertions/MustBeGreaterThanOrApproximatelyTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using FluentAssertions;
33
using Xunit;
44

@@ -202,7 +202,7 @@ public static void CallerArgumentExpressionWithTolerance_Float()
202202
.WithParameterName(nameof(pi));
203203
}
204204

205-
#if NET8_0
205+
#if NET8_0_OR_GREATER
206206
[Theory]
207207
[InlineData(15.91, 15.9, 0.1)]
208208
[InlineData(24.4999, 24.45, 0.0001)]

Code/Light.GuardClauses.Tests/ComparableAssertions/MustBeLessThanOrApproximatelyTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using FluentAssertions;
33
using Xunit;
44

@@ -202,7 +202,7 @@ public static void CallerArgumentExpressionWithTolerance_Float()
202202
.WithParameterName(nameof(threePointFive));
203203
}
204204

205-
#if NET8_0
205+
#if NET8_0_OR_GREATER
206206
[Theory]
207207
[InlineData(15.9, 15.91, 0.1)]
208208
[InlineData(24.45, 24.4999, 0.0001)]

Code/Light.GuardClauses.Tests/ComparableAssertions/MustNotBeApproximatelyTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using FluentAssertions;
33
using Xunit;
44

@@ -180,7 +180,7 @@ public static void CallerArgumentExpressionWithTolerance_Float()
180180
.WithParameterName(nameof(pi));
181181
}
182182

183-
#if NET8_0
183+
#if NET8_0_OR_GREATER
184184
[Theory]
185185
[InlineData(5.3, 5.0, 0.2)]
186186
[InlineData(10.4, 10.3, 0.01)]

Code/Light.GuardClauses.Tests/StringAssertions/IsEmailAddressTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void IsValidEmailAddress(string email)
2424
isValid.Should().BeTrue();
2525
}
2626

27-
#if NET8_0
27+
#if NET8_0_OR_GREATER
2828
[Theory]
2929
[ClassData(typeof(InvalidEmailAddressesWithNull))]
3030
public void IsNotValidEmailAddress_ReadOnlySpan(string email)

Code/Light.GuardClauses.Tests/StringAssertions/MustBeEmailAddressTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Text.RegularExpressions;
33
using FluentAssertions;
44
using Light.GuardClauses.Exceptions;
@@ -124,7 +124,7 @@ public static void CallerArgumentExpression()
124124
.WithParameterName(nameof(email));
125125
}
126126

127-
#if NET8_0
127+
#if NET8_0_OR_GREATER
128128
[Theory]
129129
[ClassData(typeof(ValidEmailAddresses))]
130130
public static void ValidEmailAddress_ReadOnlySpan(string email)

Code/Light.GuardClauses/CallerArgumentExpressionAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !NET8_0
1+
#if !NET8_0_OR_GREATER
22
// ReSharper disable once CheckNamespace -- CallerArgumentExpression must be in exactly this namespace
33
namespace System.Runtime.CompilerServices;
44

0 commit comments

Comments
 (0)