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> |
||
|---|---|---|
| .. | ||
| conformance.rs | ||
| memory_guard.rs | ||
| memory_guard_tests.rs | ||
| ocr_integration.rs | ||
| page_classification.rs | ||
| struct_tree_coverage.rs | ||
| test_xref_debug.rs | ||
| th_05_ssrf_block.rs | ||
| xref_helpers.rs | ||
| xref_integration_test.rs | ||