meson.build 285 B

12345678
  1. project('ternary operator', 'c')
  2. one = true ? 1 : error('False branch should not be evaluated')
  3. two = false ? error('True branch should not be evaluated.') : 2
  4. assert(one == 1, 'Return value from ternary true is wrong.')
  5. assert(two == 2, 'Return value from ternary false is wrong.')