leo/tests/compiler/console/log_conditional.leo

17 lines
335 B
Plaintext
Raw Normal View History

2021-05-03 16:47:33 +03:00
/*
namespace: Compile
expectation: Pass
input_file:
- input/input_unequal.in
- input/input_equal.in
2021-05-03 16:47:33 +03:00
*/
2021-01-04 19:34:38 +03:00
// Conditionally add two u32 integers and log the result to the console.
function main(a: u32, b: u32) -> bool {
2021-01-04 19:34:38 +03:00
if a == b {
2021-05-03 16:47:33 +03:00
console.log("{}=={}", a, b); // This line should not fail.
2021-01-04 19:34:38 +03:00
}
return a == b;
}