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

Closed
github-bot wants to merge 1 commit from gh-pr/316/head into gh-pr/316/base
Owner

@⁠SkippySteve on GitHub · 2026-11-24 02:15 UTC · original
SkippySteve/victory-pr-own-next21 → main · +8 −5 · 1 files · 1 commits · closed without merging

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
**@⁠SkippySteve** on GitHub · 2026-11-24 02:15 UTC · [original](https://github.com/Marvisak/VIctory/pull/316) `SkippySteve/victory-pr-own-next21` → `main` · +8 −5 · 1 files · 1 commits · closed without merging 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
The format's tables now ship in-tree (Tables::builtin), but the ignored
reference_chunks test still panicked unless VICTORY_BCPACK_TABLES named a
table file. It now uses the built-in tables by default; the variable stays
as an override for comparing another table file. Only VICTORY_BCPACK_CASES
is required.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:59:02 +00:00
github-bot closed this pull request 2026-11-26 03:59:02 +00:00
Author
Owner

@⁠SkippySteve on GitHub · 2026-11-24 02:32 UTC · original

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

**@⁠SkippySteve** on GitHub · 2026-11-24 02:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/316#issuecomment-7120247263) Folded into #315 to keep the PR count down. The commit is unchanged there.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!316
No description provided.