Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Fix tests on mono interpreter
  • Loading branch information
stephentoub committed Dec 3, 2021
commit dcffd8de0fa5d1c8878bd7c43485cff546300f78
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Threading.Tasks;
using Xunit;
using System.Linq;
using System.Runtime.CompilerServices;

namespace System.Text.RegularExpressions.Tests
{
Expand Down Expand Up @@ -327,7 +328,9 @@ public static IEnumerable<object[]> Matches_TestData()
}
}

if (engine != RegexEngine.Interpreter && !PlatformDetection.IsNetFramework)
#if !NETFRAMEWORK // these tests currently fail on .NET Framework, and we need to check IsDynamicCodeCompiled but that doesn't exist on .NET Framework
if (engine != RegexEngine.Interpreter && // these tests currently fail with RegexInterpreter
RuntimeFeature.IsDynamicCodeCompiled) // if dynamic code isn't compiled, RegexOptions.Compiled falls back to the interpreter, for which these tests currently fail
{
// Fails on interpreter and .NET Framework: [ActiveIssue("https://github.com/dotnet/runtime/issues/62094")]
yield return new object[]
Expand Down Expand Up @@ -360,6 +363,7 @@ public static IEnumerable<object[]> Matches_TestData()
};
}
}
#endif
}
}

Expand Down