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

Function test_rshift

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

Source from the content-addressed store, hash-verified

124
125 #[test]
126 fn test_rshift() {
127 for n in 1..4 {
128 let mut max_x = 15;
129 if n == 1 {
130 max_x = 30;
131 }
132 for x in 0..=max_x {
133 let mut stack = StackTracker::new();
134 let tables = u4_push_shift_tables_stack(&mut stack);
135 stack.number(x);
136 u4_rshift_stack(&mut stack, tables, n);
137 stack.number(x >> n);
138 stack.op_equalverify();
139 stack.drop(tables);
140 stack.op_true();
141 assert!(stack.run().success);
142 }
143 }
144 }
145
146 #[test]
147 fn test_2_nib_rshift_function() {

Callers

nothing calls this directly

Calls 3

u4_rshift_stackFunction · 0.85
dropMethod · 0.45

Tested by

no test coverage detected