test ~ operator.