Skip to content

Commit

Permalink
Fix macro
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Varlakov committed Dec 10, 2020
1 parent bed4a5d commit 4e67c1f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,37 +95,37 @@ pub enum ErrorSS {
#[macro_export]
macro_rules! test_for_all_curves {
(#[should_panic] $fn: ident) => {
crate::test_for_all_curves!([#[should_panic]] $fn);
$crate::test_for_all_curves!([#[should_panic]] $fn);
};
($fn: ident) => {
crate::test_for_all_curves!([] $fn);
$crate::test_for_all_curves!([] $fn);
};
([$($attrs:tt)*] $fn: ident) => {
paste::paste!{
#[test]
$($attrs)*
fn [<$fn _secp256k1>]() {
$fn::<crate::elliptic::curves::secp256_k1::GE>()
$fn::<$crate::elliptic::curves::secp256_k1::GE>()
}
#[test]
$($attrs)*
fn [<$fn _ristretto>]() {
$fn::<crate::elliptic::curves::curve_ristretto::GE>()
$fn::<$crate::elliptic::curves::curve_ristretto::GE>()
}
#[test]
$($attrs)*
fn [<$fn _ed25519>]() {
$fn::<crate::elliptic::curves::ed25519::GE>()
$fn::<$crate::elliptic::curves::ed25519::GE>()
}
#[test]
$($attrs)*
fn [<$fn _bls12_381>]() {
$fn::<crate::elliptic::curves::bls12_381::GE>()
$fn::<$crate::elliptic::curves::bls12_381::GE>()
}
#[test]
$($attrs)*
fn [<$fn _p256>]() {
$fn::<crate::elliptic::curves::p256::GE>()
$fn::<$crate::elliptic::curves::p256::GE>()
}
}
};
Expand Down

0 comments on commit 4e67c1f

Please sign in to comment.