blob: 3e650463fe26fe57b0a64577def4447b10c07e8a [file] [log] [blame]
project('ternary operator', 'c')
one = true ? 1 : error('False branch should not be evaluated')
two = false ? error('True branch should not be evaluated.') : 2
assert(one == 1, 'Return value from ternary true is wrong.')
assert(two == 2, 'Return value from ternary false is wrong.')