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

58 lines
1.4 KiB
Plaintext

program main
fn base() -> u32
u32 1073741824 : u32
fn adjust(value: u32, delta: u32) -> u32
binary + : u32
var value : u32
var delta : u32
fn doubled(value: u32) -> u32
binary * : u32
var value : u32
u32 2 : u32
fn local_total() -> u32
local let offset : unit
u32 15 : u32
call adjust : u32
call doubled : u32
call base : u32
var offset : u32
fn high_enough(value: u32) -> bool
if : bool
binary > : bool
var value : u32
u32 2147483660 : u32
binary < : bool
var value : u32
u32 2147483670 : u32
bool false : bool
fn exact_u32() -> bool
binary = : bool
call local_total : u32
u32 2147483663 : u32
fn main() -> i32
call std.io.print_u32 : unit
call local_total : u32
if : i32
call high_enough : bool
call local_total : u32
int 0 : i32
int 1 : i32
test "u32 arithmetic returns exact fixture value"
call exact_u32 : bool
test "u32 comparison works in predicates"
call high_enough : bool
call local_total : u32
test "u32 division and ordering"
if : bool
binary >= : bool
binary / : u32
call local_total : u32
u32 3 : u32
u32 715827887 : u32
binary <= : bool
binary / : u32
call local_total : u32
u32 3 : u32
u32 715827887 : u32
bool false : bool