Added complex ternary tests