Quicksort with tests.