Skip to content

Commit 7337e9b

Browse files
radekdoulikCopilot
andcommitted
[browser][CoreCLR] Enable passing System.Runtime.Tests on wasm
Remove 42 ActiveIssue/SkipOnPlatform attributes from tests that pass on browser/wasm CoreCLR interpreter. Use ConditionalClass/ConditionalFact with IsMultithreadingSupported for tests that deadlock on single-threaded wasm (ControlledExecutionTests, JitInfoTests). 12 ActiveIssue attributes remain for tests with genuine failures: - GC finalizer tests (no finalizer thread) - ConvertToInteger tests (numeric conversion bug) - Module.FullyQualifiedName/Name (returns <Unknown>) - DateTime.GetObjectData (missing Serialization.Formatters) - RuntimeFeature.DynamicCode_Jit (no dynamic code) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 6967149 commit 7337e9b

15 files changed

Lines changed: 2 additions & 46 deletions

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/DecimalTests.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,13 @@ public static IEnumerable<object[]> Ctor_IntArray_TestData()
135135

136136
[Theory]
137137
[MemberData(nameof(Ctor_IntArray_TestData))]
138-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
139138
public void Ctor_IntArray(int[] value, decimal expected)
140139
{
141140
Assert.Equal(expected, new decimal(value));
142141
}
143142

144143
[Theory]
145144
[MemberData(nameof(Ctor_IntArray_TestData))]
146-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
147145
public void Ctor_IntSpan(int[] value, decimal expected)
148146
{
149147
Assert.Equal(expected, new decimal(value.AsSpan()));
@@ -249,7 +247,6 @@ public static IEnumerable<object[]> Ctor_Int_Int_Int_Bool_Byte_TestData()
249247

250248
[Theory]
251249
[MemberData(nameof(Ctor_Int_Int_Int_Bool_Byte_TestData))]
252-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
253250
public void Ctor_Int_Int_Int_Bool_Byte(int lo, int mid, int hi, bool isNegative, byte scale, decimal expected)
254251
{
255252
Assert.Equal(expected, new decimal(lo, mid, hi, isNegative, scale));
@@ -333,7 +330,6 @@ public static IEnumerable<object[]> Add_Overflows_TestData()
333330

334331
[Theory]
335332
[MemberData(nameof(Add_Overflows_TestData))]
336-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
337333
public void Add_Overflows_ThrowsOverflowException(decimal d1, decimal d2)
338334
{
339335
Assert.Throws<OverflowException>(() => d1 + d2);
@@ -1121,7 +1117,6 @@ public static IEnumerable<object[]> Remainder_Valid_TestData()
11211117

11221118
[Theory]
11231119
[MemberData(nameof(Remainder_Valid_TestData))]
1124-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
11251120
public static void Remainder(decimal d1, decimal d2, decimal expected)
11261121
{
11271122
Assert.Equal(expected, d1 % d2);
@@ -1203,7 +1198,6 @@ public static IEnumerable<object[]> Round_Digit_Valid_TestData()
12031198

12041199
[Theory]
12051200
[MemberData(nameof(Round_Digit_Valid_TestData))]
1206-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
12071201
public static void Round_Digits_ReturnsExpected(decimal d, int digits, decimal expected)
12081202
{
12091203
Assert.Equal(expected, decimal.Round(d, digits));
@@ -1237,7 +1231,6 @@ public static IEnumerable<object[]> Round_Digit_Mid_Valid_TestData()
12371231

12381232
[Theory]
12391233
[MemberData(nameof(Round_Digit_Mid_Valid_TestData))]
1240-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
12411234
public static void Round_DigitsMode_ReturnsExpected(decimal d, int digits, MidpointRounding mode, decimal expected)
12421235
{
12431236
Assert.Equal(expected, decimal.Round(d, digits, mode));
@@ -1308,7 +1301,6 @@ public static IEnumerable<object[]> Subtract_Valid_TestData()
13081301

13091302
[Theory]
13101303
[MemberData(nameof(Subtract_Valid_TestData))]
1311-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
13121304
public static void Subtract(decimal d1, decimal d2, decimal expected)
13131305
{
13141306
Assert.Equal(expected, d1 - d2);
@@ -1327,7 +1319,6 @@ public static IEnumerable<object[]> Subtract_Invalid_TestData()
13271319

13281320
[Theory]
13291321
[MemberData(nameof(Subtract_Invalid_TestData))]
1330-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
13311322
public static void Subtract_Invalid(decimal d1, decimal d2)
13321323
{
13331324
Assert.Throws<OverflowException>(() => decimal.Subtract(d1, d2));
@@ -1714,7 +1705,6 @@ public static void DecrementOperator(decimal d, decimal expected)
17141705
Assert.Equal(expected, --d);
17151706
}
17161707

1717-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))] // too slow
17181708
public static class BigIntegerCompare
17191709
{
17201710
[Fact]

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/DelegateTests.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ public static void DynamicInvoke_DefaultParameter_ValueTypeParameterWithMissingV
315315
}
316316

317317
[Fact]
318-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
319318
public static void DynamicInvoke_DefaultParameter_ValueTypeParameterWithExplicitValue()
320319
{
321320
Assert.Equal(
@@ -324,7 +323,6 @@ public static void DynamicInvoke_DefaultParameter_ValueTypeParameterWithExplicit
324323
}
325324

326325
[Fact]
327-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
328326
public static void DynamicInvoke_DefaultParameter_DateTimeParameterWithMissingValue()
329327
{
330328
Assert.Equal(
@@ -333,7 +331,6 @@ public static void DynamicInvoke_DefaultParameter_DateTimeParameterWithMissingVa
333331
}
334332

335333
[Fact]
336-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
337334
public static void DynamicInvoke_DateTimeAndCustomConstantAttribute_DateTimeParameterWithMissingValue()
338335
{
339336
Assert.Equal(
@@ -342,7 +339,6 @@ public static void DynamicInvoke_DateTimeAndCustomConstantAttribute_DateTimePara
342339
}
343340

344341
[Fact]
345-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
346342
public static void DynamicInvoke_CustomConstantAndDateTimeAttribute_DateTimeParameterWithMissingValue()
347343
{
348344
Assert.Equal(
@@ -351,7 +347,6 @@ public static void DynamicInvoke_CustomConstantAndDateTimeAttribute_DateTimePara
351347
}
352348

353349
[Fact]
354-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
355350
public static void DynamicInvoke_CustomConstantAttribute_DateTimeParameterWithMissingValue()
356351
{
357352
Assert.Equal(
@@ -360,7 +355,6 @@ public static void DynamicInvoke_CustomConstantAttribute_DateTimeParameterWithMi
360355
}
361356

362357
[Fact]
363-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
364358
public static void DynamicInvoke_DefaultParameter_DateTimeParameterWithExplicitValue()
365359
{
366360
Assert.Equal(
@@ -369,7 +363,6 @@ public static void DynamicInvoke_DefaultParameter_DateTimeParameterWithExplicitV
369363
}
370364

371365
[Fact]
372-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
373366
public static void DynamicInvoke_DefaultParameter_DecimalParameterWithAttributeAndMissingValue()
374367
{
375368
Assert.Equal(
@@ -378,7 +371,6 @@ public static void DynamicInvoke_DefaultParameter_DecimalParameterWithAttributeA
378371
}
379372

380373
[Fact]
381-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
382374
public static void DynamicInvoke_DecimalAndCustomConstantAttribute_DecimalParameterWithAttributeAndMissingValue()
383375
{
384376
Assert.Equal(
@@ -387,7 +379,6 @@ public static void DynamicInvoke_DecimalAndCustomConstantAttribute_DecimalParame
387379
}
388380

389381
[Fact]
390-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
391382
public static void DynamicInvoke_CustomConstantAndDecimalAttribute_DecimalParameterWithAttributeAndMissingValue()
392383
{
393384
Assert.Equal(
@@ -396,7 +387,6 @@ public static void DynamicInvoke_CustomConstantAndDecimalAttribute_DecimalParame
396387
}
397388

398389
[Fact]
399-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
400390
public static void DynamicInvoke_CustomConstantAttribute_DecimalParameterWithAttributeAndMissingValue()
401391
{
402392
Assert.Equal(
@@ -405,7 +395,6 @@ public static void DynamicInvoke_CustomConstantAttribute_DecimalParameterWithAtt
405395
}
406396

407397
[Fact]
408-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
409398
public static void DynamicInvoke_DefaultParameter_DecimalParameterWithAttributeAndExplicitValue()
410399
{
411400
Assert.Equal(
@@ -414,7 +403,6 @@ public static void DynamicInvoke_DefaultParameter_DecimalParameterWithAttributeA
414403
}
415404

416405
[Fact]
417-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
418406
public static void DynamicInvoke_DefaultParameter_DecimalParameterWithMissingValue()
419407
{
420408
Assert.Equal(
@@ -423,7 +411,6 @@ public static void DynamicInvoke_DefaultParameter_DecimalParameterWithMissingVal
423411
}
424412

425413
[Fact]
426-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
427414
public static void DynamicInvoke_DefaultParameter_DecimalParameterWithExplicitValue()
428415
{
429416
Assert.Equal(
@@ -438,7 +425,6 @@ public static void DynamicInvoke_DefaultParameter_NullableIntWithMissingValue()
438425
}
439426

440427
[Fact]
441-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
442428
public static void DynamicInvoke_DefaultParameter_NullableIntWithExplicitValue()
443429
{
444430
Assert.Equal(

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/DoubleTests.GenericMath.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,6 @@ public static void ConvertToIntegerTest()
399399
[Fact]
400400
[SkipOnMono("https://github.com/dotnet/runtime/issues/100368")]
401401
[ActiveIssue("https://github.com/dotnet/runtime/issues/124344", typeof(PlatformDetection), nameof(PlatformDetection.IsAppleMobile), nameof(PlatformDetection.IsX64Process), nameof(PlatformDetection.IsCoreCLR))]
402-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
403402
public static void ConvertToIntegerNativeTest()
404403
{
405404
// Signed Values

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/GCTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,6 @@ private static void AllocateArray()
10971097

10981098
[Theory]
10991099
[InlineData(-1)]
1100-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
11011100
private static void AllocateArrayNegativeSize(int negValue)
11021101
{
11031102
Assert.Throws<OverflowException>(() => GC.AllocateUninitializedArray<byte>(-1));

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/HalfTests.GenericMath.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2454,7 +2454,6 @@ public static void op_UnaryPlusTest()
24542454

24552455
[Theory]
24562456
[MemberData(nameof(HalfTests.Parse_Valid_TestData), MemberType = typeof(HalfTests))]
2457-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
24582457
public static void ParseValidStringTest(string value, NumberStyles style, IFormatProvider provider, Half expected)
24592458
{
24602459
bool isDefaultProvider = provider == null || provider == NumberFormatInfo.CurrentInfo;
@@ -2529,7 +2528,6 @@ public static void ParseInvalidStringTest(string value, NumberStyles style, IFor
25292528

25302529
[Theory]
25312530
[MemberData(nameof(HalfTests.Parse_ValidWithOffsetCount_TestData), MemberType = typeof(HalfTests))]
2532-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
25332531
public static void ParseValidSpanTest(string value, int offset, int count, NumberStyles style, IFormatProvider provider, Half expected)
25342532
{
25352533
bool isDefaultProvider = provider == null || provider == NumberFormatInfo.CurrentInfo;

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/HalfTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,6 @@ public static void Parse_Span_Invalid(string value, NumberStyles style, IFormatP
972972

973973
[Theory]
974974
[MemberData(nameof(Parse_ValidWithOffsetCount_TestData))]
975-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
976975
public static void Parse_Utf8Span_Valid(string value, int offset, int count, NumberStyles style, IFormatProvider provider, float expectedFloat)
977976
{
978977
bool isDefaultProvider = provider == null || provider == NumberFormatInfo.CurrentInfo;

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Int128Tests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,6 @@ public static IEnumerable<object[]> Parse_Valid_TestData()
324324

325325
[Theory]
326326
[MemberData(nameof(Parse_Valid_TestData))]
327-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
328327
public static void Parse_Valid(string value, NumberStyles style, IFormatProvider provider, Int128 expected)
329328
{
330329
Int128 result;
@@ -446,7 +445,6 @@ public static IEnumerable<object[]> Parse_ValidWithOffsetCount_TestData()
446445

447446
[Theory]
448447
[MemberData(nameof(Parse_ValidWithOffsetCount_TestData))]
449-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
450448
public static void Parse_Span_Valid(string value, int offset, int count, NumberStyles style, IFormatProvider provider, Int128 expected)
451449
{
452450
Int128 result;
@@ -488,7 +486,6 @@ public static void Parse_Span_Invalid(string value, NumberStyles style, IFormatP
488486

489487
[Theory]
490488
[MemberData(nameof(Parse_ValidWithOffsetCount_TestData))]
491-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
492489
public static void Parse_Utf8Span_Valid(string value, int offset, int count, NumberStyles style, IFormatProvider provider, Int128 expected)
493490
{
494491
Int128 result;

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Numerics/TotalOrderIeee754ComparerTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ public void TotalOrderTestNFloat(NFloat x, NFloat y, int result)
137137
[Theory]
138138
[InlineData(-1)]
139139
[InlineData(int.MinValue)]
140-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
141140
public void TotalOrderTestInvalidSignificand(int significandByteCount)
142141
{
143142
var comparer = new TotalOrderIeee754Comparer<StubFloatingPointIeee754>();

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Reflection/InvokeWithRefLikeArgs.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ public static void MethodTakesRefToRefStructAsArg_ThrowsNSE()
5353

5454
[Fact]
5555
[SkipOnMono("https://github.com/dotnet/runtime/issues/40738")]
56-
[SkipOnPlatform(TestPlatforms.Browser, "https://github.com/dotnet/runtime/issues/40738")]
5756
public static void MethodTakesOutToRefStructAsArg_ThrowsNSE()
5857
{
5958
MethodInfo mi = GetMethod(nameof(TestClass.TakesOutToRefStructAsArg));

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/ControlledExecutionTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace System.Runtime.Tests
1212
{
13-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123011", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsCoreCLR))]
13+
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsMultithreadingSupported))]
1414
public sealed class ControlledExecutionTests
1515
{
1616
private volatile bool _readyForCancellation;

0 commit comments

Comments
 (0)