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

Function test_lshift

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

Source from the content-addressed store, hash-verified

107
108 #[test]
109 fn test_lshift() {
110 for n in 1..4 {
111 for x in 0..16 {
112 let mut stack = StackTracker::new();
113 let tables = u4_push_shift_tables_stack(&mut stack);
114 stack.number(x);
115 u4_lshift_stack(&mut stack, tables, n);
116 stack.number((x << n) % 16);
117 stack.op_equalverify();
118 stack.drop(tables);
119 stack.op_true();
120 assert!(stack.run().success);
121 }
122 }
123 }
124
125 #[test]
126 fn test_rshift() {

Callers

nothing calls this directly

Calls 3

u4_lshift_stackFunction · 0.85
dropMethod · 0.45

Tested by

no test coverage detected