Tasmota/lib/libesp32/Berry/tests/cond_expr.be

11 lines
300 B
Plaintext
Raw Normal View History

2021-04-12 18:53:35 +01:00
assert("" != 0 ? true : false)
assert(false || !(true ? false : true) && true)
var t1 = 8, t2 = false
if t1 ? 7 + t1 : t2
var a = 'good'
assert((a == 'good' ? a + '!' : a) == 'good!')
assert((a == 'good?' ? a + '!' : a) != 'good!')
else
assert('condition expression test failed')
end