From: Michal Strehovský Date: Wed, 1 Feb 2023 21:27:18 +0000 (+0900) Subject: Make newly introduced Immutable tests work with AOT. (#81464) X-Git-Tag: accepted/tizen/unified/riscv/20231226.055536~4287 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=047900cdb3a89b941d084271b161ad199de5307b;p=platform%2Fupstream%2Fdotnet%2Fruntime.git 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 ``` --- diff --git a/src/libraries/System.Collections.Immutable/tests/default.rd.xml b/src/libraries/System.Collections.Immutable/tests/default.rd.xml index 73d56d5..e170541 100644 --- a/src/libraries/System.Collections.Immutable/tests/default.rd.xml +++ b/src/libraries/System.Collections.Immutable/tests/default.rd.xml @@ -54,6 +54,19 @@ + + + + + + + + + + + + +