Skip to content

Commit 88a9273

Browse files
committed
tests for LdTrue and LdFalse instructions
1 parent cc4c43e commit 88a9273

File tree

1 file changed

+15
-0
lines changed
  • crates/move-bytecode-verifier/src/type_safety_tests

1 file changed

+15
-0
lines changed

crates/move-bytecode-verifier/src/type_safety_tests/mod.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,3 +594,18 @@ fn test_ld_integers_ok() {
594594
}
595595
}
596596

597+
598+
#[test]
599+
fn test_ld_true_false_ok() {
600+
for instr in vec![
601+
Bytecode::LdTrue,
602+
Bytecode::LdFalse,
603+
] {
604+
let code = vec![instr];
605+
let module = make_module(code);
606+
let fun_context = get_fun_context(&module);
607+
let result = type_safety::verify(&module, &fun_context, &mut DummyMeter);
608+
assert!(result.is_ok());
609+
}
610+
}
611+

0 commit comments

Comments
 (0)