use super::generate_snapshot;
const COMMITTED: &str = include_str!("snapshot.txt");
#[allow(clippy::expect_used)]
#[test]
fn generated_snapshot_matches_committed() {
let current = generate_snapshot();
if std::env::var_os("PRIKK_REGEN").is_some() {
let path = concat!(env!("CARGO_MANIFEST_DIR"), "/src/vectors/snapshot.txt");
std::fs::write(path, ¤t).expect("write regenerated snapshot");
return;
}
assert_eq!(
current, COMMITTED,
"generated identity snapshot drifted from snapshot.txt. If this is an intended encoding \
change, regenerate with PRIKK_REGEN=1 cargo test -p prikk-object and review the diff; \
hard FDD vectors are unaffected. If this increment claims to preserve existing identity \
(e.g. DC-55), this drift means that claim is false: STOP, do not regenerate, and escalate \
with the differing rows instead.",
);
}