BCPack tests: the reference-chunk test uses the shipped tables #316

Closed
SkippySteve wants to merge 1 commit from upstream-pr/316 into main
SkippySteve commented 2026-11-24 02:15:01 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by SkippySteve on 2026-11-24T02:15:01Z.


The BCPack tables ship in the tree (bcpack-tables.bin, read by Tables::builtin), but the opt-in reference_chunks test still demanded VICTORY_BCPACK_TABLES and panicked with VICTORY_BCPACK_TABLES when it was unset. Anyone with reference chunks had to point it at a copy of a file that already sits beside the code.

Now:

  • VICTORY_BCPACK_CASES is the only required variable; the test uses Tables::builtin() by default.
  • VICTORY_BCPACK_TABLES still works as an override for checking a different table file.
  • The #[ignore] reason says what is actually missing (reference chunks outside the repository).

Test-only change in crates/victory-formats/src/bcpack.rs; no decoder code touched.

Testing (Linux)

  • cargo test -p victory-formats: 20 passed, 3 ignored
  • cargo clippy -p victory-formats --all-targets -- -D warnings: clean
  • cargo xtask policy: ok
  • Ran the ignored test both ways against synthetic chunks made by decoding random input with the built-in tables (kept in a scratch directory outside the repo, not committed):
    • VICTORY_BCPACK_CASES=<dir> cargo test -p victory-formats reference_chunks -- --ignored: passes (it panicked on main)
    • the same plus VICTORY_BCPACK_TABLES=crates/victory-formats/src/bcpack-tables.bin: passes
<!-- greyfinch-sync:Marvisak/VIctory:issue:6573072884 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/316). Originally posted by [SkippySteve](https://github.com/SkippySteve) on 2026-11-24T02:15:01Z. --- The BCPack tables ship in the tree (`bcpack-tables.bin`, read by `Tables::builtin`), but the opt-in `reference_chunks` test still demanded `VICTORY_BCPACK_TABLES` and panicked with `VICTORY_BCPACK_TABLES` when it was unset. Anyone with reference chunks had to point it at a copy of a file that already sits beside the code. Now: - `VICTORY_BCPACK_CASES` is the only required variable; the test uses `Tables::builtin()` by default. - `VICTORY_BCPACK_TABLES` still works as an override for checking a different table file. - The `#[ignore]` reason says what is actually missing (reference chunks outside the repository). Test-only change in `crates/victory-formats/src/bcpack.rs`; no decoder code touched. ## Testing (Linux) - `cargo test -p victory-formats`: 20 passed, 3 ignored - `cargo clippy -p victory-formats --all-targets -- -D warnings`: clean - `cargo xtask policy`: ok - Ran the ignored test both ways against synthetic chunks made by decoding random input with the built-in tables (kept in a scratch directory outside the repo, not committed): - `VICTORY_BCPACK_CASES=<dir> cargo test -p victory-formats reference_chunks -- --ignored`: passes (it panicked on `main`) - the same plus `VICTORY_BCPACK_TABLES=crates/victory-formats/src/bcpack-tables.bin`: passes
upstream-sync closed this pull request 2026-11-24 06:52:22 +00:00
SkippySteve commented 2026-11-24 06:55:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by SkippySteve on 2026-11-24T02:32:38Z.


Folded into #315 to keep the PR count down. The commit is unchanged there.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7120247263 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/316#issuecomment-7120247263). Originally posted by [SkippySteve](https://github.com/SkippySteve) on 2026-11-24T02:32:38Z. --- Folded into #315 to keep the PR count down. The commit is unchanged there.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!316
No description provided.