MCPcopy Create free account
hub / github.com/BitVM/BitVM / test_rrot7

Function test_rrot7

bitvm/src/hash/blake3_utils.rs:540–563  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

538
539 #[test]
540 fn test_rrot7() {
541 let mut stack = StackTracker::new();
542 let tables = TablesVars::new(&mut stack, true);
543
544 let ret = [stack.number_u32(0xdeadbeaf), stack.number_u32(0x01020304)];
545
546 let mut var_map: HashMap<u8, StackVariable> = HashMap::new();
547 var_map.insert(0, ret[0]);
548 var_map.insert(1, ret[1]);
549
550 xor_and_rotate_right_by_7(&mut stack, &mut var_map, 0, 1, &tables);
551
552 stack.number_u32(0x57bf5f7b);
553
554 stack.custom(script! { {verify_n(8)}}, 2, false, 0, "verify");
555
556 stack.drop(ret[1]);
557
558 tables.drop(&mut stack);
559
560 stack.op_true();
561
562 assert!(stack.run().success);
563 }
564
565 #[test]
566 fn test_g() {

Callers

nothing calls this directly

Calls 2

dropMethod · 0.45

Tested by

no test coverage detected