Skip to content

Commit f9ffbe0

Browse files
authored
[release/9.0-staging] Backport test fixes related to BinaryFormatter removal (#111508)
* [NRBF] Reduce the most time-consuming test case to avoid timeouts for checked builds (#110550) * don't run drawing tests on Mono (#111208) * don't run Drawing-related tests that do things like creating Bitmaps on Mono, as it's not supported (it does not support ComWrappers) * re-enable the tests
1 parent f2a1313 commit f9ffbe0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ private static bool GetLinqExpressionsBuiltWithIsInterpretingOnly()
168168
return !(bool)typeof(LambdaExpression).GetMethod("get_CanCompileToIL").Invoke(null, Array.Empty<object>());
169169
}
170170

171-
// Drawing is not supported on non windows platforms in .NET 7.0+.
172-
public static bool IsDrawingSupported => IsWindows && IsNotWindowsNanoServer && IsNotWindowsServerCore;
171+
// Drawing is not supported on non windows platforms in .NET 7.0+ and on Mono.
172+
public static bool IsDrawingSupported => IsWindows && IsNotWindowsNanoServer && IsNotWindowsServerCore && IsNotMonoRuntime;
173173

174174
public static bool IsAsyncFileIOSupported => !IsBrowser && !IsWasi;
175175

src/libraries/System.Formats.Nrbf/tests/ArraySinglePrimitiveRecordTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public NonSeekableStream(byte[] buffer) : base(buffer) { }
1919

2020
public static IEnumerable<object[]> GetCanReadArrayOfAnySizeArgs()
2121
{
22-
foreach (int size in new[] { 1, 127, 128, 512_001, 512_001 })
22+
foreach (int size in new[] { 1, 127, 128, 20_001 })
2323
{
2424
yield return new object[] { size, true };
2525
yield return new object[] { size, false };

0 commit comments

Comments
 (0)