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

Function test_and_with_xor_full_table

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

Source from the content-addressed store, hash-verified

117
118 #[test]
119 fn test_and_with_xor_full_table() {
120 for x in 0..16 {
121 for y in 0..16 {
122 let mut stack = StackTracker::new();
123 let xor = u4_push_full_xor_table_stack(&mut stack);
124 let lookup = u4_push_full_lookup_table_stack(&mut stack);
125 let shift = u4_push_shift_tables_stack(&mut stack);
126 stack.number(x);
127 stack.number(y);
128 u4_and_with_xor_stack(&mut stack, lookup, xor, shift);
129 stack.number(x & y);
130 stack.op_equalverify();
131 stack.drop(shift);
132 stack.drop(lookup);
133 stack.drop(xor);
134 stack.op_true();
135 assert!(stack.run().success);
136 }
137 }
138 }
139
140 #[test]
141 fn test_and_with_xor_half_table() {

Callers

nothing calls this directly

Calls 5

u4_and_with_xor_stackFunction · 0.85
dropMethod · 0.45

Tested by

no test coverage detected