ValueComparator uses ascending flag, tests