fix ternary test cases (2)