From d03486c3f958d5c1a270019330448a6182cda525 Mon Sep 17 00:00:00 2001 From: Tobin Harding Date: Tue, 1 Mar 2022 18:50:49 +0000 Subject: [PATCH] Remove schnorrsig from test names Recently we moved from using the identifier 'schnorrsig' to 'schnorr', we omitted to update the tests. While we are at it use more idiomatic Rust unit test names (i.e., do not start test name with `test_` because it stutters when the name is read in output of `cargo test`). --- src/schnorr.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/schnorr.rs b/src/schnorr.rs index c3e6720a5..f44f5eac1 100644 --- a/src/schnorr.rs +++ b/src/schnorr.rs @@ -304,7 +304,7 @@ mod tests { #[test] #[cfg(all(feature = "std", feature = "rand-std"))] - fn test_schnorrsig_sign_with_aux_rand_verify() { + fn schnorr_sign_with_aux_rand_verify() { test_schnorrsig_sign_helper(|secp, msg, seckey, rng| { let mut aux_rand = [0u8; 32]; rng.fill_bytes(&mut aux_rand); @@ -314,7 +314,7 @@ mod tests { #[test] #[cfg(all(feature = "std", feature = "rand-std"))] - fn test_schnorrsig_sign_with_rng_verify() { + fn schnor_sign_with_rng_verify() { test_schnorrsig_sign_helper(|secp, msg, seckey, mut rng| { secp.sign_schnorr_with_rng(msg, seckey, &mut rng) }) @@ -322,7 +322,7 @@ mod tests { #[test] #[cfg(all(feature = "std", feature = "rand-std"))] - fn test_schnorrsig_sign_verify() { + fn schnorr_sign_verify() { test_schnorrsig_sign_helper(|secp, msg, seckey, _| { secp.sign_schnorr(msg, seckey) }) @@ -330,14 +330,14 @@ mod tests { #[test] #[cfg(all(feature = "std", feature = "rand-std"))] - fn test_schnorrsig_sign_no_aux_rand_verify() { + fn schnorr_sign_no_aux_rand_verify() { test_schnorrsig_sign_helper(|secp, msg, seckey, _| { secp.sign_schnorr_no_aux_rand(msg, seckey) }) } #[cfg(all(feature = "std", feature = "rand-std"))] - fn test_schnorrsig_sign_helper( + fn schnorr_sign_helper( sign: fn(&Secp256k1, &Message, &KeyPair, &mut ThreadRng) -> Signature, ) { let secp = Secp256k1::new(); @@ -361,7 +361,7 @@ mod tests { #[test] #[cfg(any(feature = "alloc", feature = "std"))] #[cfg(not(fuzzing))] // fixed sig vectors can't work with fuzz-sigs - fn test_schnorrsig_sign() { + fn schnorr_sign() { let secp = Secp256k1::new(); let hex_msg = hex_32!("E48441762FB75010B2AA31A512B62B4148AA3FB08EB0765D76B252559064A614"); @@ -384,7 +384,7 @@ mod tests { #[test] #[cfg(not(fuzzing))] // fixed sig vectors can't work with fuzz-sigs #[cfg(any(feature = "alloc", feature = "std"))] - fn test_schnorrsig_verify() { + fn schnorr_verify() { let secp = Secp256k1::new(); let hex_msg = hex_32!("E48441762FB75010B2AA31A512B62B4148AA3FB08EB0765D76B252559064A614");