14 lines
No EOL
317 B
Text
14 lines
No EOL
317 B
Text
# Test bitwise operations
|
|
fn test_bitwise() -> int do
|
|
let a = 5; # 0b0101
|
|
let b = 3; # 0b0011
|
|
|
|
let and_result = a bitand b; # Should be 1 (0b0001)
|
|
let or_result = a bitor b; # Should be 7 (0b0111)
|
|
|
|
and_result + or_result # Should be 8
|
|
end
|
|
|
|
fn main() -> int do
|
|
test_bitwise()
|
|
end |