Add sort test.
Fix negative int sorting.