pdftract/crates/pdftract-core/tests
jedarden 2e91637187 test(bf-4fa0y): add shared memory-guard test helper
Add test helper for running code under bounded memory limits and asserting
graceful failure (no OOM panic/abort). Uses POSIX rlimit (RLIMIT_AS) on
Linux/macOS; skips on Windows.

Implements:
- run_under_memory_limit(): Execute closure with memory limit
- assert_fails_under_memory_limit(): Assert graceful failure
- assert_succeeds_under_memory_limit(): Assert success within budget

Applied to allocation-sensitive test scenarios (vector, string, hashmap
allocations). Tests with tight limits are marked #[ignore] to avoid
interference when run in the same process.

Closes: bf-4fa0y

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 08:29:57 -04:00
..
conformance.rs feat(pdftract-3s2i): implement Phase 5.5.2 validation filter 2026-05-24 04:57:17 -04:00
memory_guard.rs test(bf-4fa0y): add shared memory-guard test helper 2026-05-24 08:29:57 -04:00
memory_guard_tests.rs test(bf-4fa0y): add shared memory-guard test helper 2026-05-24 08:29:57 -04:00
ocr_integration.rs feat(pdftract-3s2i): implement Phase 5.5.2 validation filter 2026-05-24 04:57:17 -04:00
page_classification.rs feat(pdftract-3s2i): implement Phase 5.5.2 validation filter 2026-05-24 04:57:17 -04:00
struct_tree_coverage.rs feat(pdftract-3s2i): implement Phase 5.5.2 validation filter 2026-05-24 04:57:17 -04:00
test_xref_debug.rs feat(pdftract-3s2i): implement Phase 5.5.2 validation filter 2026-05-24 04:57:17 -04:00
th_05_ssrf_block.rs feat(pdftract-3s2i): implement Phase 5.5.2 validation filter 2026-05-24 04:57:17 -04:00
xref_helpers.rs feat(pdftract-1s2uj): add xref test fixture corpus and integration test runner 2026-05-24 08:20:04 -04:00
xref_integration_test.rs feat(pdftract-1s2uj): add xref test fixture corpus and integration test runner 2026-05-24 08:20:04 -04:00