diff --git a/src/ImageSharp/Metadata/Profiles/Exif/ExifReader.cs b/src/ImageSharp/Metadata/Profiles/Exif/ExifReader.cs index 9b5e098c83..abfe835b16 100644 --- a/src/ImageSharp/Metadata/Profiles/Exif/ExifReader.cs +++ b/src/ImageSharp/Metadata/Profiles/Exif/ExifReader.cs @@ -202,7 +202,7 @@ protected void ReadSubIfd(List values) protected void ReadValues64(List values, ulong offset) { - DebugGuard.MustBeLessThanOrEqualTo(offset, (ulong)this.data.Length, "By spec UInt64.MaxValue is supported, but .Net Stream.Length can Int64.MaxValue."); + DebugGuard.MustBeLessThanOrEqualTo(offset, (ulong)this.data.Length, "By spec UInt64.MaxValue is supported, but .NET Stream.Length can Int64.MaxValue."); this.Seek(offset); ulong count = this.ReadUInt64(); diff --git a/src/ImageSharp/Processing/Processors/Transforms/Linear/AffineTransformProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Transforms/Linear/AffineTransformProcessor{TPixel}.cs index f6fadca33e..f74cf59493 100644 --- a/src/ImageSharp/Processing/Processors/Transforms/Linear/AffineTransformProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Transforms/Linear/AffineTransformProcessor{TPixel}.cs @@ -187,12 +187,12 @@ public void Invoke(in RowInterval rows, Span span) && RuntimeEnvironment.IsNetCore) { // There's something wrong with the JIT in .NET Core 3.1 on certain - // MacOSX machines so we have to use different pipelines. + // macOS machines so we have to use different pipelines. // It's: // - Not reproducable locally // - Doesn't seem to be triggered by the bulk Numerics.UnPremultiply method but by caller. // https://github.com/SixLabors/ImageSharp/pull/1591 - this.InvokeMacOSX(in rows, span); + this.InvokeMacOS(in rows, span); return; } @@ -259,7 +259,7 @@ public void Invoke(in RowInterval rows, Span span) [ExcludeFromCodeCoverage] [MethodImpl(InliningOptions.ShortMethod)] - private void InvokeMacOSX(in RowInterval rows, Span span) + private void InvokeMacOS(in RowInterval rows, Span span) { Matrix3x2 matrix = this.matrix; TResampler sampler = this.sampler; diff --git a/src/ImageSharp/Processing/Processors/Transforms/Linear/ProjectiveTransformProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Transforms/Linear/ProjectiveTransformProcessor{TPixel}.cs index 26b970d8b5..9bb9c113d4 100644 --- a/src/ImageSharp/Processing/Processors/Transforms/Linear/ProjectiveTransformProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Transforms/Linear/ProjectiveTransformProcessor{TPixel}.cs @@ -186,12 +186,12 @@ public void Invoke(in RowInterval rows, Span span) && RuntimeEnvironment.IsNetCore) { // There's something wrong with the JIT in .NET Core 3.1 on certain - // MacOSX machines so we have to use different pipelines. + // macOS machines so we have to use different pipelines. // It's: // - Not reproducable locally // - Doesn't seem to be triggered by the bulk Numerics.UnPremultiply method but by caller. // https://github.com/SixLabors/ImageSharp/pull/1591 - this.InvokeMacOSX(in rows, span); + this.InvokeMacOS(in rows, span); return; } @@ -258,7 +258,7 @@ public void Invoke(in RowInterval rows, Span span) [ExcludeFromCodeCoverage] [MethodImpl(InliningOptions.ShortMethod)] - public void InvokeMacOSX(in RowInterval rows, Span span) + public void InvokeMacOS(in RowInterval rows, Span span) { Matrix4x4 matrix = this.matrix; TResampler sampler = this.sampler; diff --git a/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderTests.cs index 29d1cbdc51..39fa50c93c 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderTests.cs @@ -192,7 +192,7 @@ public void TiffDecoder_CanDecode_12Bit_WithUnassociatedAlpha(TestImageP public void TiffDecoder_CanDecode_12Bit_WithAssociatedAlpha(TestImageProvider provider) where TPixel : unmanaged, IPixel { - if (TestEnvironment.IsOSX) + if (TestEnvironment.IsMacOS) { // Only debug save on OSX: For some reason the reference image has a difference of 50%. The imagesharp output file looks ok though. using Image image = provider.GetImage(TiffDecoder); @@ -249,7 +249,7 @@ public void TiffDecoder_CanDecode_20Bit_WithAssociatedAlpha(TestImagePro where TPixel : unmanaged, IPixel { - if (TestEnvironment.IsOSX) + if (TestEnvironment.IsMacOS) { // Only debug save on OSX: For some reason the reference image has a difference of 50%. The imagesharp output file looks ok though. using Image image = provider.GetImage(TiffDecoder); @@ -276,7 +276,7 @@ public void TiffDecoder_CanDecode_24Bit_WithUnassociatedAlpha(TestImageP public void TiffDecoder_CanDecode_24Bit_WithAssociatedAlpha(TestImageProvider provider) where TPixel : unmanaged, IPixel { - if (TestEnvironment.IsOSX) + if (TestEnvironment.IsMacOS) { // Only debug save on OSX: For some reason the reference image has a difference of 50%. The imagesharp output file looks ok though. using Image image = provider.GetImage(TiffDecoder); @@ -313,7 +313,7 @@ public void TiffDecoder_CanDecode_YCbCr_24Bit(TestImageProvider where TPixel : unmanaged, IPixel { // Note: The image from MagickReferenceDecoder does not look right, maybe we are doing something wrong - // converting the pixel data from Magick.Net to our format with YCbCr? + // converting the pixel data from Magick.NET to our format with YCbCr? using Image image = provider.GetImage(); image.DebugSave(provider); } @@ -353,7 +353,7 @@ public void TiffDecoder_CanDecode_32Bit_WithUnassociatedAlpha(TestImageP public void TiffDecoder_CanDecode_32Bit_WithAssociatedAlpha(TestImageProvider provider) where TPixel : unmanaged, IPixel { - if (TestEnvironment.IsOSX) + if (TestEnvironment.IsMacOS) { // Only debug save on OSX: For some reason the reference image has a difference of 50%. The imagesharp output file looks ok though. using Image image = provider.GetImage(TiffDecoder); @@ -393,7 +393,7 @@ public void TiffDecoder_CanDecode_40Bit_WithUnassociatedAlpha(TestImageP public void TiffDecoder_CanDecode_40Bit_WithAssociatedAlpha(TestImageProvider provider) where TPixel : unmanaged, IPixel { - if (TestEnvironment.IsOSX) + if (TestEnvironment.IsMacOS) { // Only debug save on OSX: For some reason the reference image has a difference of 50%. The imagesharp output file looks ok though. using Image image = provider.GetImage(TiffDecoder); @@ -432,7 +432,7 @@ public void TiffDecoder_CanDecode_48Bit_WithUnassociatedAlpha(TestImageP public void TiffDecoder_CanDecode_48Bit_WithAssociatedAlpha(TestImageProvider provider) where TPixel : unmanaged, IPixel { - if (TestEnvironment.IsOSX) + if (TestEnvironment.IsMacOS) { // Only debug save on OSX: For some reason the reference image has a difference of 50%. The imagesharp output file looks ok though. using Image image = provider.GetImage(TiffDecoder); @@ -462,7 +462,7 @@ public void TiffDecoder_CanDecode_56Bit_WithUnassociatedAlpha(TestImageP public void TiffDecoder_CanDecode_56Bit_WithAssociatedAlpha(TestImageProvider provider) where TPixel : unmanaged, IPixel { - if (TestEnvironment.IsOSX) + if (TestEnvironment.IsMacOS) { // Only debug save on OSX: For some reason the reference image has a difference of 50%. The imagesharp output file looks ok though. using Image image = provider.GetImage(TiffDecoder); diff --git a/tests/ImageSharp.Tests/Helpers/RuntimeEnvironmentTests.cs b/tests/ImageSharp.Tests/Helpers/RuntimeEnvironmentTests.cs index 8074b8b150..5246f8f911 100644 --- a/tests/ImageSharp.Tests/Helpers/RuntimeEnvironmentTests.cs +++ b/tests/ImageSharp.Tests/Helpers/RuntimeEnvironmentTests.cs @@ -28,7 +28,7 @@ public void CanDetectOSPlatform() { Assert.True(RuntimeEnvironment.IsOSPlatform(OSPlatform.Linux)); } - else if (TestEnvironment.IsOSX) + else if (TestEnvironment.IsMacOS) { Assert.True(RuntimeEnvironment.IsOSPlatform(OSPlatform.OSX)); } diff --git a/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedMemoryPoolTests.Trim.cs b/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedMemoryPoolTests.Trim.cs index f748b7feb4..d1a8e25bb5 100644 --- a/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedMemoryPoolTests.Trim.cs +++ b/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedMemoryPoolTests.Trim.cs @@ -58,11 +58,11 @@ public class NonParallelCollection [Collection(nameof(NonParallelCollection))] public class NonParallel { - public static readonly bool IsNotMacOs = !TestEnvironment.IsOSX; + public static readonly bool IsNotMacOS = !TestEnvironment.IsMacOS; - // TODO: Investigate failures on MacOS. All handles are released after GC. + // TODO: Investigate failures on macOS. All handles are released after GC. // (It seems to happen more consistently on .NET 6.) - [ConditionalFact(nameof(IsNotMacOs))] + [ConditionalFact(nameof(IsNotMacOS))] public void MultiplePoolInstances_TrimPeriodElapsed_AllAreTrimmed() { if (!TestEnvironment.RunsOnCI) diff --git a/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedMemoryPoolTests.cs b/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedMemoryPoolTests.cs index 7d98eff611..2976bf7fde 100644 --- a/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedMemoryPoolTests.cs +++ b/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedMemoryPoolTests.cs @@ -245,9 +245,9 @@ public void Rent_MultiBuff_BelowCapacity_Succeeds(int initialRent, int attempt, cleanup.Register(b1); } - public static readonly bool IsNotMacOS = !TestEnvironment.IsOSX; + public static readonly bool IsNotMacOS = !TestEnvironment.IsMacOS; - // TODO: Investigate MacOS failures + // TODO: Investigate macOS failures [ConditionalTheory(nameof(IsNotMacOS))] [InlineData(false)] [InlineData(true)] diff --git a/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedPoolMemoryAllocatorTests.cs b/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedPoolMemoryAllocatorTests.cs index 414f991f70..0520c3c1fe 100644 --- a/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedPoolMemoryAllocatorTests.cs +++ b/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedPoolMemoryAllocatorTests.cs @@ -259,9 +259,9 @@ static void RunTest() [InlineData(1200)] // Group of two UniformUnmanagedMemoryPool buffers public void AllocateMemoryGroup_Finalization_ReturnsToPool(int length) { - if (TestEnvironment.IsOSX) + if (TestEnvironment.IsMacOS) { - // Skip on OSX: https://github.com/SixLabors/ImageSharp/issues/1887 + // Skip on macOS: https://github.com/SixLabors/ImageSharp/issues/1887 return; } @@ -321,9 +321,9 @@ private static void AllocateGroupAndForget(UniformUnmanagedMemoryPoolMemoryAlloc [InlineData(600)] // Group of single UniformUnmanagedMemoryPool buffer public void AllocateSingleMemoryOwner_Finalization_ReturnsToPool(int length) { - if (TestEnvironment.IsOSX) + if (TestEnvironment.IsMacOS) { - // Skip on OSX: https://github.com/SixLabors/ImageSharp/issues/1887 + // Skip on macOS: https://github.com/SixLabors/ImageSharp/issues/1887 return; } diff --git a/tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeTests.cs b/tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeTests.cs index b1ff3df08c..9d766e0585 100644 --- a/tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeTests.cs +++ b/tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeTests.cs @@ -34,7 +34,7 @@ public class ResizeTests }; private static readonly ImageComparer ValidatorComparer = - ImageComparer.TolerantPercentage(TestEnvironment.IsOSX && TestEnvironment.RunsOnCI ? 0.26F : 0.07F); + ImageComparer.TolerantPercentage(TestEnvironment.IsMacOS && TestEnvironment.RunsOnCI ? 0.26F : 0.07F); [Fact] public void Resize_PixelAgnostic() diff --git a/tests/ImageSharp.Tests/TestUtilities/ImageComparison/Exceptions/ImageDifferenceIsOverThresholdException.cs b/tests/ImageSharp.Tests/TestUtilities/ImageComparison/Exceptions/ImageDifferenceIsOverThresholdException.cs index e1cbf12ac9..220b78e48d 100644 --- a/tests/ImageSharp.Tests/TestUtilities/ImageComparison/Exceptions/ImageDifferenceIsOverThresholdException.cs +++ b/tests/ImageSharp.Tests/TestUtilities/ImageComparison/Exceptions/ImageDifferenceIsOverThresholdException.cs @@ -24,7 +24,7 @@ private static string StringifyReports(IEnumerable report sb.Append(Environment.NewLine); - // TODO: We should add OSX. + // TODO: We should add macOS. sb.AppendFormat("Test Environment OS : {0}", TestEnvironment.IsWindows ? "Windows" : "Linux"); sb.Append(Environment.NewLine); diff --git a/tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs b/tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs index 3ccaf2ba37..df584173ee 100644 --- a/tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs +++ b/tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs @@ -110,7 +110,7 @@ internal static string GetReferenceOutputFileName(string actualOutputFileName) = internal static bool IsLinux => RuntimeInformation.IsOSPlatform(OSPlatform.Linux); - internal static bool IsOSX => RuntimeInformation.IsOSPlatform(OSPlatform.OSX); + internal static bool IsMacOS => RuntimeInformation.IsOSPlatform(OSPlatform.OSX); internal static bool IsMono => Type.GetType("Mono.Runtime") != null; // https://stackoverflow.com/a/721194