Tests: use size_t for sizes, not int.
Remove unused variables by the way.