Add tests for opcode classification
This commit is contained in:
parent
c252b36786
commit
b0ad6748e4
|
@ -888,6 +888,17 @@ mod tests {
|
|||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn classify_test() {
|
||||
let op186 = all::OP_CHECKSIGADD;
|
||||
assert_eq!(op186.classify(ClassifyContext::Legacy), Class::ReturnOp);
|
||||
assert_eq!(op186.classify(ClassifyContext::TapScript), Class::Ordinary(Ordinary::OP_CHECKSIGADD));
|
||||
|
||||
let op187 = all::OP_RETURN_187;
|
||||
assert_eq!(op187.classify(ClassifyContext::Legacy), Class::ReturnOp);
|
||||
assert_eq!(op187.classify(ClassifyContext::TapScript), Class::SuccessOp);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn str_roundtrip() {
|
||||
let mut unique = HashSet::new();
|
||||
|
|
Loading…
Reference in New Issue