CultLib/tests/vectors/numeric-leaves
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens 26ff9d27e9 numeric-leaves vectors gain two float32 rows; float32 integer rounding drops its redundant guard
An odd kept value just past exact pins the tie rule (the Stryker survivor). The excess <= 0 guard was equivalent to the
general path for the only values that reach it, so it is deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 08:45:48 +02:00
..
mixed-record.msgpack numeric-leaves vectors: reads, writes and a mixed record, written by the C# reference 2026-10-11 08:34:30 +02:00
README.md numeric-leaves vectors: reads, writes and a mixed record, written by the C# reference 2026-10-11 08:34:30 +02:00
reads.msgpack numeric-leaves vectors gain two float32 rows; float32 integer rounding drops its redundant guard 2026-10-11 08:45:48 +02:00
writes.msgpack numeric-leaves vectors: reads, writes and a mixed record, written by the C# reference 2026-10-11 08:34:30 +02:00

numeric-leaves vectors

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

A document with one slot, [value], whose slot is a C# int, long, float or double (leaf int32, int64, float32, float64).

  • reads.msgpack: an array of [leaf, payload, accepted, bits]. payload (bin) is the one-slot record fed to the reference; accepted is whether it read; bits (bin, 8 bytes, big-endian) is the int64 it read, or the IEEE bits of the double it read (a float32 widened), and empty when refused. Every value is fed to every leaf.
  • writes.msgpack: an array of [leaf, text, bytes]. text is a decimal for an integer leaf and the double's IEEE bits in hex for a float leaf; bytes (bin) is the one-slot record the reference writes for that value.