fixed type checking rules of equality test operators
enforced the evaluation order of test cases