slovo/tests/random.checked.lower
2026-05-22 08:38:43 +02:00

17 lines
424 B
Plaintext

program main
fn random_i32() -> i32
call std.random.i32 : i32
fn random_is_non_negative() -> bool
if : bool
binary < : bool
call random_i32 : i32
int 0 : i32
bool false : bool
bool true : bool
fn main() -> i32
call std.io.print_bool : unit
call random_is_non_negative : bool
int 0 : i32
test "random i32 is non-negative"
call random_is_non_negative : bool