()
| 239 | #[test] |
| 240 | fn console_print_int_basic() { |
| 241 | let src = r#" |
| 242 | console := import("console") |
| 243 | |
| 244 | main: () -> i32 { |
| 245 | console.print_int(42) |
| 246 | console.putchar(10) |
| 247 | console.print_int(-7) |
| 248 | console.putchar(10) |
| 249 | console.print_int(0) |
| 250 | console.putchar(10) |
| 251 | return 0 |
| 252 | } |
| 253 | "#; |
| 254 | let (uart, exit) = link_stdlib_and_run(src); |
| 255 | assert_eq!(uart, "42\n-7\n0\n"); |
| 256 | assert_eq!(exit, Some(0)); |
| 257 | } |
| 258 | |
| 259 | // Drives the inline-asm path through the assembler's parse_instruction_line: |
| 260 | // the block stores 42 into a stack slot with sd and reads it back with ld. |
| 261 | #[test] |
nothing calls this directly
no test coverage detected