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

60 lines
1.5 KiB
Plaintext

program main
fn base() -> u64
u64 4294967296 : u64
fn adjust(value: u64, delta: u64) -> u64
binary + : u64
var value : u64
var delta : u64
fn doubled(value: u64) -> u64
binary * : u64
var value : u64
u64 2 : u64
fn local_total() -> u64
local let offset : unit
u64 19 : u64
call adjust : u64
binary / : u64
call doubled : u64
call base : u64
u64 2 : u64
var offset : u64
fn high_enough(value: u64) -> bool
if : bool
binary > : bool
var value : u64
u64 4294967300 : u64
binary < : bool
var value : u64
u64 4294967320 : u64
bool false : bool
fn exact_u64() -> bool
binary = : bool
call local_total : u64
u64 4294967315 : u64
fn main() -> i32
call std.io.print_u64 : unit
call local_total : u64
if : i32
call high_enough : bool
call local_total : u64
int 0 : i32
int 1 : i32
test "u64 arithmetic returns exact fixture value"
call exact_u64 : bool
test "u64 comparison works in predicates"
call high_enough : bool
call local_total : u64
test "u64 division and ordering"
if : bool
binary >= : bool
binary / : u64
call local_total : u64
u64 5 : u64
u64 858993463 : u64
binary <= : bool
binary / : u64
call local_total : u64
u64 5 : u64
u64 858993463 : u64
bool false : bool