MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / print_int_basic

Function print_int_basic

tests/vm_diag_test.rs:241–258  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

239#[test]
240fn console_print_int_basic() {
241 let src = r#"
242console := import("console")
243
244main: () -> 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]

Callers

nothing calls this directly

Calls 1

link_stdlib_and_runFunction · 0.85

Tested by

no test coverage detected