Improve range trimming tests