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

Function test_xor_half

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

Source from the content-addressed store, hash-verified

181
182 #[test]
183 fn test_xor_half() {
184 for x in 0..16 {
185 for y in 0..16 {
186 let mut stack = StackTracker::new();
187 let xor = u4_push_half_xor_table_stack(&mut stack);
188 let lookup = u4_push_half_lookup_table_0_based_stack(&mut stack);
189 stack.number(x);
190 stack.number(y);
191 u4_logic_with_table_stack(&mut stack, lookup, xor);
192 stack.number(x ^ y);
193 stack.op_equalverify();
194 stack.drop(lookup);
195 stack.drop(xor);
196 stack.op_true();
197 assert!(stack.run().success);
198 }
199 }
200 }
201
202 #[test]
203 fn test_and_half() {

Callers

nothing calls this directly

Calls 4

dropMethod · 0.45

Tested by

no test coverage detected