diff --git a/tests/GameCult.Caching.Tests/UnionArmGuardTests.cs b/tests/GameCult.Caching.Tests/UnionArmGuardTests.cs index 91c94d3c..d67a86d5 100644 --- a/tests/GameCult.Caching.Tests/UnionArmGuardTests.cs +++ b/tests/GameCult.Caching.Tests/UnionArmGuardTests.cs @@ -394,7 +394,7 @@ namespace GameCult.Caching.Tests typeof(G>), typeof(G>), typeof(G>), typeof(G>), typeof(G>), typeof(G>), typeof(G>), - typeof(G>), typeof(G), typeof(G), typeof(G), + typeof(G>), typeof(G), typeof(G), typeof(G), typeof(G), }) { if (holder != typeof(G)) @@ -471,6 +471,12 @@ namespace GameCult.Caching.Tests [Key(1)] public KBagE Bag = new(); } + // A non-generic list that also enumerates arms: the one collection shape MessagePack's BuiltinResolver writes. + public sealed class ArrayOfArms : System.Collections.ArrayList, IEnumerable + { + IEnumerator IEnumerable.GetEnumerator() => this.Cast().GetEnumerator(); + } + [MessagePackObject] public sealed class G { [Key(0)] public T? Value; } [Union(0, typeof(GuArm))] public interface IGu { } [MessagePackObject] public sealed class GuArm : IGu { [Key(0)] [CultElementId] public string Id = string.Empty; [Key(1)] public List Items = new(); }