24 tests, four files
contracts/test/ covers each contract in isolation, plus an integration suite forked against real BSC mainnet state:
Why Integration.t.sol forks real mainnet
Integration.t.sol calls vm.createSelectFork() against a live BSC RPC and runs everything against that fork: seeding real liquidity, buying and selling through the actual deployed PancakeSwap router, then calling swapAndBurn against the real router and factory, not a mock. It costs zero gas and zero real funds (it's a read/simulate fork, nothing is broadcast), and it's the closest thing to a mainnet dry run available before actually deploying.
The reentrancy proof
test/mocks/MaliciousToken.sol is a token whose burn() calls back into FeeRouter.swapAndBurn(). The test in FeeRouter.t.sol asserts the outer call reverts, proving the guard holds under an actual reentrancy attempt, not just by inspection.
Running it yourself
Set up the RPC
contracts/.env.example to contracts/.env. The public default (bsc-dataseed.binance.org) works for tests; swap in a paid provider if you hit rate limits.Build
cd contracts && forge build --sizesTest
forge test -vvv, which includes the mainnet-forked integration suite automatically.Format check
forge fmt --check, matching what CI (.github/workflows/test.yml) runs.