The following standalone console applications comprise the FastMM5 test suite. They use FastMM_TestUtils.pas for shared scaffolding, assertions, and failure counting.
| Program | What it covers |
|---|---||
| `FastMM5Test_DebugMode.dpr` | Smoke test: entering and leaving debug mode, allocating, writing, reallocating and freeing in both modes, and the allocated byte count returning to its starting value. |
| `FastMM5Test_SizeClasses.dpr` | Every size class from 1 byte to 2 MB, plus reallocations across the class boundaries, each verified by a size dependent fill pattern. |
| `FastMM5Test_UsagePerSizeClass.dpr` | Churns each size class in turn and asserts that nothing stays allocated and that the committed address space does not keep growing from phase to phase. |
| `FastMM5Test_ModeTransition.dpr` | The contract of the debug and erase mode switches (issue #85): the nesting counter follows the calls, not their success, even if a Begin fails. |
| `FastMM5Test_DoubleFree.dpr` | Double free handling (issue #73): ensures the second free is rejected and leaves the pending free list intact. |
| `FastMM5Test_ScanCoverage.dpr` | Verifies `FastMM_ScanDebugBlocksForCorruption` detects corrupted header checksums, overruns into debug footers, and writes into freed blocks for small, medium, and large blocks. |
| `FastMM5Test_ScanRace.dpr` | Ensures a scanning thread does not report false corruption or crash while other threads churn small debug blocks. |
| `FastMM5Test_ScanHeaderBounds.dpr` | Corrupts size fields in the debug header (`UserSize`, `StackTraceEntryCount`) to ensure the scanner produces a clean corruption report rather than an access violation. |
| `FastMM5Test_MultiThreadStress.dpr` | Multithreaded allocation stress with optional cross-thread frees. Parameters: `Threads Iterations MaxBlockSize DebugMode CrossThreadFree`. |