tests for range function