tests for sort