test(app): OCR 캐시 mock-engine 결정적 검증 — 재실행=엔진 미호출 + byte-identical + 버전 무효화

This commit is contained in:
2026-06-25 01:13:02 +00:00
parent e64a56a321
commit f375b694b6
2 changed files with 168 additions and 0 deletions

View File

@@ -28,6 +28,12 @@ impl MockOcrEngine {
fail,
}
}
/// Number of `recognize` calls so far (cache-hit tests assert this stays
/// flat across a re-run).
pub fn call_count(&self) -> usize {
*self.call_index.lock().unwrap()
}
}
impl OcrEngine for MockOcrEngine {