()
| 159 | |
| 160 | #[test] |
| 161 | fn decode_illegal() { |
| 162 | // Opcode 0 is not a valid RISC-V opcode |
| 163 | let result = decode(0x0000_0000); |
| 164 | assert!( |
| 165 | matches!(result, Err(VmError::IllegalInstruction(0))), |
| 166 | "opcode 0 should be illegal, got {result:?}" |
| 167 | ); |
| 168 | } |