[t] Add test for negative numbers in FFA.sort + refactoring