pub fn assert_slice_eq(
b: &CircuitBuilder,
name: impl Into<String>,
len_bytes: Wire,
actual: &[Wire],
expected: &[Wire],
)Expand description
Asserts that two byte sequences (packed little-endian into 64-bit words) are equal in their
first len_bytes bytes. Bytes past len_bytes are ignored on both sides.
For each word index i, the saturating difference diff = len_bytes - i*8 selects between:
- full-word
assert_eqwhendiff > 8(whole word is in range), - partial comparison via
var_sll_bytesshifting both sides left by8 - diffbytes so only the lowdiffbytes remain (1 ≤ diff ≤ 8 — note that thediff = 8case picks the shifted form withshift = 0, which is identical to the original word), and - skipped comparison (both sides forced to zero) when the diff is 0.
§Panics
Panics if actual.len() != expected.len().