Tests: Improve range tests to check inclusive/exclusive on ends.

closes #8199