We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
LdU*
1 parent 135631d commit cc4c43eCopy full SHA for cc4c43e
crates/move-bytecode-verifier/src/type_safety_tests/mod.rs
@@ -574,3 +574,23 @@ fn test_branch_nop_ok() {
574
assert!(result.is_ok());
575
}
576
577
+
578
579
+#[test]
580
+fn test_ld_integers_ok() {
581
+ for instr in vec![
582
+ Bytecode::LdU8(42),
583
+ Bytecode::LdU16(257),
584
+ Bytecode::LdU32(89),
585
+ Bytecode::LdU64(94),
586
+ Bytecode::LdU128(Box::new(9999)),
587
+ Bytecode::LdU256(Box::new(U256::from(745_u32))),
588
+ ] {
589
+ let code = vec![instr];
590
+ let module = make_module(code);
591
+ let fun_context = get_fun_context(&module);
592
+ let result = type_safety::verify(&module, &fun_context, &mut DummyMeter);
593
+ assert!(result.is_ok());
594
+ }
595
+}
596
0 commit comments