zcash_primitives: Fix names of some test vector macros

This commit is contained in:
Jack Grigg 2020-08-21 18:25:30 +01:00
parent ed3489a111
commit ca5bc6b0ae
1 changed files with 6 additions and 6 deletions

View File

@ -1731,13 +1731,13 @@ mod tests {
fn test_vectors() { fn test_vectors() {
let test_vectors = crate::test_vectors::note_encryption::make_test_vectors(); let test_vectors = crate::test_vectors::note_encryption::make_test_vectors();
macro_rules! read_fr { macro_rules! read_bls12_381_scalar {
($field:expr) => {{ ($field:expr) => {{
bls12_381::Scalar::from_repr($field[..].try_into().unwrap()).unwrap() bls12_381::Scalar::from_repr($field[..].try_into().unwrap()).unwrap()
}}; }};
} }
macro_rules! read_fs { macro_rules! read_jubjub_scalar {
($field:expr) => {{ ($field:expr) => {{
jubjub::Fr::from_repr($field[..].try_into().unwrap()).unwrap() jubjub::Fr::from_repr($field[..].try_into().unwrap()).unwrap()
}}; }};
@ -1757,12 +1757,12 @@ mod tests {
// Load the test vector components // Load the test vector components
// //
let ivk = read_fs!(tv.ivk); let ivk = read_jubjub_scalar!(tv.ivk);
let pk_d = read_point!(tv.default_pk_d).into_subgroup().unwrap(); let pk_d = read_point!(tv.default_pk_d).into_subgroup().unwrap();
let rcm = read_fs!(tv.rcm); let rcm = read_jubjub_scalar!(tv.rcm);
let cv = read_point!(tv.cv); let cv = read_point!(tv.cv);
let cmu = read_fr!(tv.cmu); let cmu = read_bls12_381_scalar!(tv.cmu);
let esk = read_fs!(tv.esk); let esk = read_jubjub_scalar!(tv.esk);
let epk = read_point!(tv.epk).into_subgroup().unwrap(); let epk = read_point!(tv.epk).into_subgroup().unwrap();
// //