Fix test testing the stop parameter

Previously it wasn’t actually test the stop parameter.
Use a custom struct type instead of an array.
Allow the block to be nil.

Update the documentation as well.
Remove the block and pass in NULL instead.