Make newly introduced Immutable tests work with AOT. (#81464)
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Wed, 1 Feb 2023 21:27:18 +0000 (06:27 +0900)
committerGitHub <noreply@github.com>
Wed, 1 Feb 2023 21:27:18 +0000 (06:27 +0900)
commit047900cdb3a89b941d084271b161ad199de5307b
treeb1cd9c9f87dd7b44fff73844f35d998a77447843
parent97ddb55e3adde20ceac579d935cef83cfe996169
Make newly introduced Immutable tests work with AOT. (#81464)

Adds xunit garbage to fix 144 test failures that look like this:

```
[FAIL] System.Collections.Frozen.Tests.FrozenDictionary_Generic_Tests_SimpleStruct_int.LookupItems_AllItemsFoundAsExpected(size: 1024, comparer: NonDefaultEqualityComparer`1 { }, specifySameComparer: True, optimizeForReading: True)
System.NotSupportedException : 'Xunit.Sdk.AssertEqualityComparer`1[System.Collections.Generic.HashSet`1[System.Collections.Generic.KeyValuePair`2[System.Collections.Frozen.Tests.SimpleStruct, System.Int32]]].CompareTypedSets[System.Collections.Generic.KeyValuePair`2[System.Collections.Frozen.Tests.SimpleStruct, System.Int32]](System.Collections.IEnumerable,System.Collections.IEnumerable)' is missing native code. MethodInfo.MakeGenericMethod() is not compatible with AOT compilation. Inspect and fix AOT related warnings that were generated when the app was published. For more information see https://aka.ms/nativeaot-compatibility
   at System.Reflection.Runtime.MethodInfos.RuntimeNamedMethodInfo`1.GetUncachedMethodInvoker(RuntimeTypeInfo[], MemberInfo) + 0x2a
   at System.Reflection.Runtime.MethodInfos.RuntimeNamedMethodInfo`1.MakeGenericMethod(Type[]) + 0x1c0
   at System.Collections.Frozen.Tests.FrozenDictionary_Generic_Tests`2.LookupItems_AllItemsFoundAsExpected(Int32 size, IEqualityComparer`1 comparer, Boolean specifySameComparer, Boolean optimizeForReading) + 0x46d
```
src/libraries/System.Collections.Immutable/tests/default.rd.xml