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

Function hll_defer_free

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

Source from the content-addressed store, hash-verified

1035 );
1036}
1037
1038#[test]
1039fn test_multiply() {
1040 // 6 * 7 = 42
1041 let (_, outcome) = assemble_and_run(vec![
1042 ri(RealInstruction::Addi(Addi::new(11, 0, 6))), // a1 = 6
1043 ri(RealInstruction::Addi(Addi::new(12, 0, 7))), // a2 = 7
1044 ri(RealInstruction::Mul(Mul::new(10, 11, 12))), // a0 = 6 * 7 = 42
1045 ri(RealInstruction::Addi(Addi::new(17, 0, 93))), // a7 = 93
1046 ri(RealInstruction::Ecall(Ecall::new())),
1047 ]);
1048 assert!(
1049 matches!(outcome, RunOutcome::Halted(42)),
1050 "expected Halted(42), got {outcome:?}"
1051 );
1052}
1053
1054#[test]
1055fn test_divide() {

Callers

nothing calls this directly

Calls 1

run_hllFunction · 0.70

Tested by

no test coverage detected