lexicographical_compare and tests