Add test to opcodes

Cargo mutant found a mutant in opcodes.

Add a test to kill it.
This commit is contained in:
Jamil Lambert, PhD 2025-02-06 16:07:25 +00:00
parent a380d4b9de
commit 486d55f042
No known key found for this signature in database
GPG Key ID: 54DC29234AB5D2C0
1 changed files with 6 additions and 0 deletions

View File

@ -565,6 +565,12 @@ mod tests {
assert_eq!(s, " OP_NOP");
}
#[test]
fn ordinary_op_code() {
let ordinary_op = Ordinary::from_opcode(OP_PUSHDATA1).expect("0x4C");
assert_eq!(ordinary_op.to_u8(), 0x4C_u8);
}
#[test]
fn decode_pushnum() {
// Test all possible opcodes