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

Function test_and_half

bitvm/src/u4/u4_logic_stack.rs:203–220  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

201
202 #[test]
203 fn test_and_half() {
204 for x in 0..16 {
205 for y in 0..16 {
206 let mut stack = StackTracker::new();
207 let and = u4_push_half_and_table_stack(&mut stack);
208 let lookup = u4_push_half_lookup_table_0_based_stack(&mut stack);
209 stack.number(x);
210 stack.number(y);
211 u4_logic_with_table_stack(&mut stack, lookup, and);
212 stack.number(x & y);
213 stack.op_equalverify();
214 stack.drop(lookup);
215 stack.drop(and);
216 stack.op_true();
217 assert!(stack.run().success);
218 }
219 }
220 }
221}

Callers

nothing calls this directly

Calls 4

dropMethod · 0.45

Tested by

no test coverage detected