()
| 396 | |
| 397 | #[test] |
| 398 | fn test_hash_witness() { |
| 399 | let mut prng = ChaCha20Rng::seed_from_u64(117); |
| 400 | let fld = ark_bn254::Fq6::rand(&mut prng); |
| 401 | let elem = super::DataType::Fp6Data(fld); |
| 402 | |
| 403 | let check_output_bit = 1; |
| 404 | let preim = elem.to_witness(ElementType::Fp6); |
| 405 | let scr = script! { |
| 406 | for p in preim { |
| 407 | {p.push()} |
| 408 | } |
| 409 | {check_output_bit} |
| 410 | {elem.to_hash().as_hint_type().push()} |
| 411 | {Fq::toaltstack()} |
| 412 | {hash_messages(vec![ElementType::Fp6])} |
| 413 | }; |
| 414 | let res = execute_script(scr); |
| 415 | assert!(!res.success && res.final_stack.len() == 1); |
| 416 | } |
| 417 | } |
nothing calls this directly
no test coverage detected