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

Function test_2_nib_rshift_function

bitvm/src/u4/u4_shift_stack.rs:147–164  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

145
146 #[test]
147 fn test_2_nib_rshift_function() {
148 for n in 1..4 {
149 for y in 0..16 {
150 for x in 0..16 {
151 let mut stack = StackTracker::new();
152 let tables = u4_push_shift_tables_stack(&mut stack);
153 stack.number(x);
154 stack.number(y);
155 u4_2_nib_shift_stack(&mut stack, tables, n);
156 stack.number((((y << 4) + x) >> n) % 16);
157 stack.op_equalverify();
158 stack.drop(tables);
159 stack.op_true();
160 assert!(stack.run().success);
161 }
162 }
163 }
164 }
165
166 #[test]
167 fn test_2_nib_shift_blake() {

Callers

nothing calls this directly

Calls 3

u4_2_nib_shift_stackFunction · 0.85
dropMethod · 0.45

Tested by

no test coverage detected