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

Function hll_putchar_output

tests/integration/vm_execution.rs:618–636  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

616 assert_eq!(
617 format!("{base_outcome:?}"),
618 format!("{opt_outcome:?}"),
619 "IR optimization changed the exit outcome"
620 );
621 assert_eq!(base_uart, opt_uart, "IR optimization changed UART output");
622 assert!(
623 opt_lines < base_lines,
624 "const-fold + DCE should remove instructions: {base_lines} -> {opt_lines}"
625 );
626}
627
628#[test]
629fn ir_opt_preserves_control_flow_program() {
630 // The peephole stress program has params and loops: optimization must not
631 // change its result even where little folds.
632 let (base_outcome, base_uart, _) =
633 run_hll_optimize(PEEPHOLE_PROGRAM, hll_to_ir::OptOptions::none());
634 let (opt_outcome, opt_uart, _) =
635 run_hll_optimize(PEEPHOLE_PROGRAM, hll_to_ir::OptOptions::all());
636
637 assert_eq!(
638 format!("{base_outcome:?}"),
639 format!("{opt_outcome:?}"),

Callers

nothing calls this directly

Calls 1

run_hllFunction · 0.70

Tested by

no test coverage detected