Repository navigation
Commit 83a4f61
test(libretro): a dual cabinet's own state round-trips through the C ABI
Copilot's #562 overview noted the libretro serialize change (NL-09,
retro_serialize now going through VsDualSystem::snapshot_into) lacked direct
ABI coverage. The harness already sent a dual state through retro_serialize,
but only to show a REJECTED state being refused. Nothing loaded the
frontend's own dual state back through retro_unserialize.
New: a_dual_cabinet_state_round_trips_through_the_abi. Save at frame 10,
run 50 more, load the save through retro_unserialize (must return true), and
a fresh save must equal it byte for byte. Mutation: writing each block's
length prefix one too long in snapshot_into makes the load fail, so the test
fails; restored, it passes (39 libretro tests, 1 selected).
Its limit, stated in the doc comment: both consoles run the same program in
this cabinet, so it proves the container's framing and lengths, not the order
of the two blocks. The core's snapshot_into_round_trips_into_a_fresh_cabinet
owns the order and catches a swap.
fmt and clippy -p rustynes-libretro --all-targets -D warnings pass.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014qfTKi2M3swo7qnwvYCkDj1 parent 1d3b177 commit 83a4f61
1 file changed
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
931 | 931 | | |
932 | 932 | | |
933 | 933 | | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
934 | 968 | | |
935 | 969 | | |
936 | 970 | | |
| |||
0 commit comments