Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
leontiadZen committed Mar 29, 2023
1 parent 6bfa167 commit 7bdad5a
Showing 1 changed file with 1 addition and 39 deletions.
40 changes: 1 addition & 39 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,42 +45,4 @@ impl fmt::Display for ErrorSS {
}
impl error::Error for ErrorSS {}

#[cfg(test)]
#[macro_export]
macro_rules! test_for_all_curves {
(#[should_panic] $fn: ident) => {
crate::test_for_all_curves!([#[should_panic]] $fn);
};
($fn: ident) => {
crate::test_for_all_curves!([] $fn);
};
([$($attrs:tt)*] $fn: ident) => {
paste::paste!{
#[test]
$($attrs)*
fn [<$fn _secp256k1>]() {
$fn::<crate::elliptic::curves::secp256_k1::GE>()
}
#[test]
$($attrs)*
fn [<$fn _ristretto>]() {
$fn::<crate::elliptic::curves::curve_ristretto::GE>()
}
#[test]
$($attrs)*
fn [<$fn _ed25519>]() {
$fn::<crate::elliptic::curves::ed25519::GE>()
}
#[test]
$($attrs)*
fn [<$fn _bls12_381>]() {
$fn::<crate::elliptic::curves::bls12_381::g1::GE>()
}
#[test]
$($attrs)*
fn [<$fn _p256>]() {
$fn::<crate::elliptic::curves::p256::GE>()
}
}
};
}

0 comments on commit 7bdad5a

Please sign in to comment.