tests for sorting locations