From b9c8425a6363e177acff09f14c8ee541bcf15312 Mon Sep 17 00:00:00 2001 From: Yagnadeep <77982741+yagnadeepxo@users.noreply.github.com> Date: Tue, 27 Feb 2024 23:23:27 +0530 Subject: [PATCH] Delete zk_prover/fuzz/fuzz_targets/util_fuzz.rs --- zk_prover/fuzz/fuzz_targets/util_fuzz.rs | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 zk_prover/fuzz/fuzz_targets/util_fuzz.rs diff --git a/zk_prover/fuzz/fuzz_targets/util_fuzz.rs b/zk_prover/fuzz/fuzz_targets/util_fuzz.rs deleted file mode 100644 index 36f716a..0000000 --- a/zk_prover/fuzz/fuzz_targets/util_fuzz.rs +++ /dev/null @@ -1,23 +0,0 @@ -#![no_main] - -use libfuzzer_sys::fuzz_target; -use num_bigint::BigUint; -use summa_solvency::merkle_sum_tree::utils::{big_intify_username, big_uint_to_fp, fp_to_big_uint}; - -fuzz_target!(|data: &[u8]| { - if let Ok(username) = std::str::from_utf8(data) { - let big_uint_username = big_intify_username(username); - - let bytes_back = big_uint_username.to_bytes_be(); - assert_eq!(username.as_bytes(), bytes_back.as_slice()); - - let fp_username = big_uint_to_fp(&big_uint_username); - let big_uint_back = fp_to_big_uint(fp_username); - - let fp_back = big_uint_to_fp(&big_uint_back); - assert_eq!( - fp_username, fp_back, - "Fp conversion cycle should be consistent" - ); - } -});