Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public static partial class PlatformDetection
public static bool IsArgIteratorSupported => IsMonoRuntime || (IsWindows && IsNotArmProcess);
public static bool IsArgIteratorNotSupported => !IsArgIteratorSupported;
public static bool Is32BitProcess => IntPtr.Size == 4;
public static bool Is64BitProcess => IntPtr.Size == 8;

// Windows 10 Insider Preview Build 16215 introduced the necessary APIs for the UAP version of
// ClientWebSocket.ReceiveAsync to consume partial message data as it arrives, without having to wait
Expand Down
6 changes: 4 additions & 2 deletions src/System.Text.RegularExpressions/tests/Regex.Match.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,9 @@ public void Match_Timeout_Throws()
}

// On 32-bit we can't test these high inputs as they cause OutOfMemoryExceptions.
// On Linux, we may get killed by the OOM Killer; on Windows, it will swap instead
[OuterLoop("Can take several seconds")]
[ConditionalTheory(typeof(Environment), nameof(Environment.Is64BitProcess))]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.Is64BitProcess), nameof(PlatformDetection.IsWindows))]
[InlineData(RegexOptions.Compiled)]
[InlineData(RegexOptions.None)]
public void Match_Timeout_Loop_Throws(RegexOptions options)
Expand All @@ -394,8 +395,9 @@ public void Match_Timeout_Loop_Throws(RegexOptions options)
}

// On 32-bit we can't test these high inputs as they cause OutOfMemoryExceptions.
// On Linux, we may get killed by the OOM Killer; on Windows, it will swap instead
[OuterLoop("Can take several seconds")]
[ConditionalTheory(typeof(Environment), nameof(Environment.Is64BitProcess))]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.Is64BitProcess), nameof(PlatformDetection.IsWindows))]
[InlineData(RegexOptions.Compiled)]
[InlineData(RegexOptions.None)]
public void Match_Timeout_Repetition_Throws(RegexOptions options)
Expand Down