From 35386acc51d28428d0d4093071587f422bb1c1a1 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 11 Oct 2026 08:34:30 +0200 Subject: [PATCH] numeric-leaves vectors: reads, writes and a mixed record, written by the C# reference Regenerated twice on Yggdrasil under CULTCACHE_WRITE_VECTORS=1 and byte-identical. The cultcache-ts test still imports the deleted hand table until the next commit, so this commit and its parent do not build the TS tests. Co-Authored-By: Claude Opus 5.5 --- tests/vectors/numeric-leaves/README.md | 14 ++++++++++++++ .../vectors/numeric-leaves/mixed-record.msgpack | Bin 0 -> 20 bytes tests/vectors/numeric-leaves/reads.msgpack | Bin 0 -> 3643 bytes tests/vectors/numeric-leaves/writes.msgpack | Bin 0 -> 1276 bytes 4 files changed, 14 insertions(+) create mode 100644 tests/vectors/numeric-leaves/README.md create mode 100644 tests/vectors/numeric-leaves/mixed-record.msgpack create mode 100644 tests/vectors/numeric-leaves/reads.msgpack create mode 100644 tests/vectors/numeric-leaves/writes.msgpack diff --git a/tests/vectors/numeric-leaves/README.md b/tests/vectors/numeric-leaves/README.md new file mode 100644 index 00000000..e7ecb070 --- /dev/null +++ b/tests/vectors/numeric-leaves/README.md @@ -0,0 +1,14 @@ +# 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. diff --git a/tests/vectors/numeric-leaves/mixed-record.msgpack b/tests/vectors/numeric-leaves/mixed-record.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..8077258bc5d4191f852a5e947f1612444cdd53b4 GIT binary patch literal 20 YcmbQbD9@0cP&?q-&5)LO=m6=aLdjX+RWEAX-F6 zMIb3oy4Gde$Vq^$8TnTR>R@D{fAGkT%Ppo`gn4#a$`NB zOQ1_X1YNU7hjH_vzbNU zHdRe~Q*`!sx%|`eK%VS1 zub#e6qufT4^H%JgPcLb_QhVX^=F!oyLN@IbVRdmfQ!!`xPSh5F?1GE0>2n`)RqA|D#(Bx6=eWM$pB#t-l3K^bN$bu6|vN+9U;{1zD z;9sWEe~^n~SvkUHvSDv6**G+pjYD(U0L^3*ko0^l**Jf>Y#f@)#`)B;ar^kfaFy!L zlx(o4XM=38(z3xakqvJSvf&lW=KcK#kM?5UXf7Ze#!%rTozHa53GT(y?B|5Yr+J(+ zQ9!qT-#tId+_8j4cXA`?C8K%H#BTDX#ic?T7kDkD-6r>~#DvrDwoVV;I2-C_yYsfa z7Ffx@me^>!V87*i5c&U5v0UT7;^G^a)js|J^Ag{cUyz=+Z!-JPtH6&7@wE(zrxD|O zA;MOgR^-qR1nlBPoZw}e*o#cT%QW&{u*5A2d7%f=osr!j$r*V`?67h5Q zkNL;o;`8(J0&NPs`UK4ifV1C93jmfPun^w>lLFAiO93eG?i1DLzn%Hd3&6z!zwq&? z0Hppq3jpW7q5wEvR8KF`f8Xl6or>zg%QW(x1pvMsS1153t||aBjeb`a0DrEu0MNH_ rwC^kc&eq^EY2ZwTC;I(e_u>2>T1bwX literal 0 HcmV?d00001 diff --git a/tests/vectors/numeric-leaves/writes.msgpack b/tests/vectors/numeric-leaves/writes.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..6bb1bad8d84facdbdd5335b40f1a1a9d22ed9c43 GIT binary patch literal 1276 zcmZ{iy>8S%6otJ3A(WR0FJLsD|B*o1md99DYY7PjA(0llq_t9kXdncn&;&t4m%>%p zkifP`Ns$MLsOW}!$1|Ss8m96Ye{;^6YyZmb?j1bZdB*4)(rz?a5Cw>d7yAWOAgd^K zd!t#_K~o`6+o)xGvpJmvvjZsv6S!pqyQ>)am^%G*r~F8(T{omO5>qA z^K~Up1}6DnMouO(lKhZU!;Mtb2n+!KE;@Z9+s)<->|r2%#*raJ6~<5j{fIGzW47>o z@9-)A2eh)6Xp?o{Q1av+20T`HzKR~}Io##kaTXhHoRWVwlrp9$VNydKB{Wfpp$#sN zeaXk1#>m>a{r74ti43hrS3_uJFI=A8`%pf9GJ{|Dh?S)#$$}Z5Y#&2ZLOe9dnjvw2 zxjcGI(pCI;YfYP{>oY$D-G0KHxRI r-C>bZ3#JyF%{7=RVdj|lTwUFJk?p=tsP#DkRb7v~*8dEo{3QMY9GJp# literal 0 HcmV?d00001