| 1 | fn test_bitness() { |
| 2 | mut x := 0 |
| 3 | $if x32 { |
| 4 | println('system is 32 bit') |
| 5 | x = 1 |
| 6 | } |
| 7 | $if x64 { |
| 8 | println('system is 64 bit') |
| 9 | x = 2 |
| 10 | } |
| 11 | assert x > 0 |
| 12 | } |
| 13 | |
| 14 | fn test_endianness() { |
| 15 | mut x := 0 |
| 16 | $if little_endian { |
| 17 | println('system is little endian') |
| 18 | x = 1 |
| 19 | } |
| 20 | $if big_endian { |
| 21 | println('system is big endian') |
| 22 | x = 2 |
| 23 | } |
| 24 | assert x > 0 |
| 25 | } |
| 26 |