Add more test cases for is_even/is_odd methods

We need to test an odd number as well as an even.
pull/750/head
Emmanuele Bassi 9 years ago
parent 128da74038
commit 5fec1620d2
  1. 6
      test cases/common/68 number arithmetic/meson.build

@ -37,8 +37,10 @@ if 9 - 9 % 2 != 8
error('Modulo precendence with subtraction is broken')
endif
assert(2.is_even(), 'int is_even() broken')
assert(not(2.is_odd()), 'int is_odd() broken')
assert(2.is_even(), 'int is_even() broken for even value')
assert(not(2.is_odd()), 'int is_odd() broken for even value')
assert(not(3.is_even()), 'int is_even() broken for odd value')
assert(3.is_odd(), 'int is_odd() broken for odd value')
assert(3 < 4, 'Lt broken')
assert(not(4 < 3), 'Lt broken')

Loading…
Cancel
Save