refactor(prover): move inline table tests to tests/#614
Conversation
Relocate the #[cfg(test)] mod tests blocks out of the table source files in prover/src/tables/ into prover/src/tests/, alongside the existing per-table test files. - 7 new files: page/register/load/memw/memw_aligned/memw_register/ keccak_rnd _tests.rs - decode and trace_builder inline tests appended to their existing decode_tests.rs / trace_builder_tests.rs - is_register_op and collect_bitwise_from_keccak bumped to pub(crate) so the relocated trace_builder tests can reach them bitwise.rs has no #[test] functions (only a #[cfg(test)] test helper) and is left unchanged; trace_builder's #[cfg(test)] impl helper methods also stay in place.
Codex Code ReviewNo issues found in the PR diff. The changes are primarily test relocation into Verification note: I attempted |
Review: refactor(prover): move inline table tests to tests/Clean refactoring — no security issues, no logic changes, no bugs introduced. Tests are mechanically moved, not modified. Two minor points: [Low] Redundant [Low] |
| ); | ||
| } | ||
|
|
||
| #[cfg(test)] |
There was a problem hiding this comment.
[Low] Redundant #[cfg(test)] — this file is already only compiled under #[cfg(test)] (see lib.rs:22), so this inner guard is a no-op. Safe to remove.
| #[cfg(test)] | |
| mod keccak_tests { |
| } | ||
| } | ||
|
|
||
| #[cfg(test)] |
There was a problem hiding this comment.
[Low] Redundant #[cfg(test)] — same as above, already in a test-only module.
| #[cfg(test)] | |
| mod routing_tests { |
Continue relocating #[cfg(test)] mod tests blocks out of prover source files into prover/src/tests/. - auto_storage.rs tests -> tests/auto_storage_tests.rs, gated on the disk-spill feature to match the auto_storage module - constraints/templates.rs test -> tests/templates_tests.rs - select_storage_mode and the GOLDILOCKS_BYTES / CUBIC_EXT_BYTES / KECCAK_NODE_BYTES consts bumped to pub(crate) for the relocated tests
Codex Code ReviewNo issues found in the PR diff. The production changes appear limited to moving tests out of implementation modules and widening a few helpers/constants to I could not run |
| ); | ||
| } | ||
|
|
||
| #[cfg(test)] |
There was a problem hiding this comment.
Low – redundant #[cfg(test)]
This file is already only compiled in test mode (declared as #[cfg(test)] pub mod trace_builder_tests; in mod.rs), so #[cfg(test)] on the nested mod keccak_tests and mod routing_tests is a no-op. Same pattern repeats at line 776. Harmless, but slightly misleading.
Review: refactor(prover): move inline table tests to tests/Clean, low-risk refactoring. All tests are faithfully relocated with no logic changes or drops. A few minor observations: Low – redundant
|
Relocate the #[cfg(test)] mod tests blocks out of the table source files in prover/src/tables/ into prover/src/tests/, alongside the existing per-table test files.
bitwise.rs has no #[test] functions (only a #[cfg(test)] test helper) and is left unchanged; trace_builder's #[cfg(test)] impl helper methods also stay in place.