Expand description
Step 5: the definition of done for one port.
fmt, clippy (warnings are errors), cargo tests, no unexplained unsafe, every function
ported, the built module exposes the original API, and the recorded behavior replays cleanly.
Structs§
- Check
- Gate
Outcome - Test
Counts - Tests and assertions in the crate (
src/without the bindings, andtests/).
Constants§
- MAX_
GROWTH - How many times the source’s lines the port may take before
gatecalls it bloated, plus a fixed allowance for the imports and signatures every port has.
Functions§
- gate
- literals_
check - Recorded values written into the port as literals although the original never spells them
out: a port that answers the recorded cases from a table passes
diffwithout porting anything. Fails onLITERALS_FAILor more, or on any read of the recording itself; fewer pass with their names. A literal on a line with// recorded-literal: <reason>is left out. Recorded error text is left out too: the runtime often writes it (division by zero), and the port has to reproduce it. - ported_
check - No function in
src/port.rsis stillunimplemented!. - rust_
checks - The checks that hold for any Rust crate, bindings or not: fmt, clippy (warnings are errors),
cargo test, and
unsafeonly with a// SAFETY:comment. - save_
tests_ baseline - Saves the crate’s test counts as the baseline the next
testscheck compares with. - test_
counts - tests_
check - Fails when tests or assertions were removed, or tests ignored, since the last passing gate: weakening the tests is not a way to pass.
- text
- Format the text output for a
GateOutcome. Every check’s detail begins in the same column by padding check names to the longest check name.