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

Function real_inst_enum_encoding

crates/asm-to-binary/tests/asm_encoding.rs:322–329  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

320
321// --- RealInstruction enum dispatching ---
322
323#[test]
324fn real_inst_enum_encoding() {
325 let i = RealInstruction::Add(Add::new(1, 2, 3));
326 assert_eq!(i.encode(), 0x003100b3u32);
327 let i = RealInstruction::Lb(Lb::new(5, 6, 0));
328 assert_eq!(i.encode(), 0x00030283u32);
329 let i = RealInstruction::FaddD(FaddD::new(10, 11, 12));
330 assert_eq!(i.encode(), 0x02c58553u32);
331}
332

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected