diff options
Diffstat (limited to 'v_windows/v/vlib/v/tests/comptime_bittness_and_endianess_test.v')
-rw-r--r-- | v_windows/v/vlib/v/tests/comptime_bittness_and_endianess_test.v | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/v_windows/v/vlib/v/tests/comptime_bittness_and_endianess_test.v b/v_windows/v/vlib/v/tests/comptime_bittness_and_endianess_test.v new file mode 100644 index 0000000..d405d45 --- /dev/null +++ b/v_windows/v/vlib/v/tests/comptime_bittness_and_endianess_test.v @@ -0,0 +1,25 @@ +fn test_bitness() { + mut x := 0 + $if x32 { + println('system is 32 bit') + x = 1 + } + $if x64 { + println('system is 64 bit') + x = 2 + } + assert x > 0 +} + +fn test_endianness() { + mut x := 0 + $if little_endian { + println('system is little endian') + x = 1 + } + $if big_endian { + println('system is big endian') + x = 2 + } + assert x > 0 +} |