| 1 | import os |
| 2 | import rand |
| 3 | |
| 4 | const my_random_letter_const = u8(65) + (rand.u8() % 26) |
| 5 | |
| 6 | fn test_rand_is_initialized_before_main() { |
| 7 | eprintln('random letter: ${my_random_letter_const.str()} | ASCII code: ${my_random_letter_const}') |
| 8 | assert my_random_letter_const.is_capital() |
| 9 | } |
| 10 | |
| 11 | // |
| 12 | |
| 13 | const last_constant = fn_that_calls_a_method_on_a_constant() |
| 14 | const a_constant = os.join_path(@VEXEROOT, 'a') |
| 15 | |
| 16 | fn fn_that_calls_a_method_on_a_constant() string { |
| 17 | return a_constant.replace('\\', '/') |
| 18 | } |
| 19 | |
| 20 | fn test_consts_initialised_with_a_function_that_uses_other_consts_as_receivers_are_properly_ordered() { |
| 21 | assert last_constant != '' |
| 22 | } |
| 23 | |