CultLib/tests/vectors/slot-nil
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-12 00:09:37 +02:00
..
README.md Caching and cultcache-ts tests: slot-nil rows for a four-byte UTF-8 character in a string slot and in a byte[] slot 2026-10-12 00:08:23 +02:00
reads.msgpack Caching tests: write slot-nil/reads.msgpack from the C# reference with the two four-byte UTF-8 rows (CULTCACHE_WRITE_VECTORS=1 on Yggdrasil) 2026-10-12 00:09:37 +02:00

slot-nil vectors

Written only by the C# reference, tests/GameCult.Caching.Tests/SlotNilVectorTests.cs, with CULTCACHE_WRITE_VECTORS=1. Every other run reads this file and compares it byte for byte; a changed vector is a reviewed commit. Other runtimes decode it and are held to the same answers.

A record of five slots: S string, I int, B byte[], R a record of one string, L List of string.

  • reads.msgpack: an array of [name, payload, accepted, rewritten]. payload (bin) is the record fed to the reference; accepted is whether it read; rewritten (bin) is what the reference writes after reading it, and empty when refused. It covers a nil in each kind of slot, a MessagePack str in the byte[] slot, a four-byte UTF-8 character (U+1F600) as the string slot and as a str in the byte[] slot, and records short of their last slots.