Convert range tests to single function.

Closes #19.