()
| 131 | |
| 132 | main: () -> i32 { |
| 133 | console.putchar(72) |
| 134 | console.putchar(105) |
| 135 | console.putchar(10) |
| 136 | return 0 |
| 137 | } |
| 138 | "#; |
| 139 | let (uart, exit) = link_stdlib_and_run(src); |
| 140 | assert_eq!(uart.trim_end_matches('\n'), "Hi"); |
| 141 | assert_eq!(exit, Some(0)); |
| 142 | } |
| 143 | |
| 144 | #[test] |
| 145 | fn printf_constexpr() { |
| 146 | let src = std::fs::read_to_string("programs/example/compile_time_math/compile_time_math.hll") |
| 147 | .unwrap(); |
| 148 | let (uart, exit) = link_stdlib_and_run(&src); |
| 149 | assert_eq!( |
| 150 | uart, "-- compile-time math --\n7205512787ok\n", |
nothing calls this directly
no test coverage detected