C#: pin the one-value refusal on codec and Mesh single-file reads (#141)

This commit is contained in:
Libby 2026-11-12 18:47:44 +00:00
commit dca0c5d095
2 changed files with 27 additions and 0 deletions

View file

@ -110,6 +110,15 @@ namespace GameCult.Caching.Tests
Assert.That(message, Does.Contain(typeof(UnionSurface).FullName).And.Contain($"1 {Clause}").And.Contain("refused on read"));
}
// The inspector reads documents through CultCodec.Deserialize (type == document), not DecodeDocument: its branch is its own path.
[Test]
public void CodecDeserializeOfADocumentRefusesATail()
{
var codec = CultCacheMessagePack.CreateCodec(Registry);
var message = Message(() => codec.Deserialize(typeof(UnionSurface), typeof(UnionSurface), Base.Concat(new byte[] { 0xc0 }).ToArray()));
Assert.That(message, Does.Contain(typeof(UnionSurface).FullName).And.Contain($"1 {Clause}").And.Contain("refused on read"));
}
[Test]
public void StoreLoadRefuses()
{