tests: Add test to make sure residual tolerance is working.

Signed-off-by: Matthew Emmett <memmett@gmail.com>