mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-06 20:41:14 +00:00
Make #[feature(test)] depend on #[cfg(all(test, feature = "bench"))].
* FIXES Issue #38: https://github.com/isislovecruft/curve25519-dalek/pull/38
This commit is contained in:
parent
3882a41d27
commit
f6930997d2
6 changed files with 8 additions and 6 deletions
|
|
@ -36,6 +36,7 @@ version = "0.4"
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
std = ["rand"]
|
std = ["rand"]
|
||||||
yolocrypto = []
|
yolocrypto = []
|
||||||
|
bench = []
|
||||||
|
|
||||||
# The development profile, used for `cargo build`.
|
# The development profile, used for `cargo build`.
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
|
|
|
||||||
|
|
@ -1354,7 +1354,7 @@ mod test {
|
||||||
// Benchmarks
|
// Benchmarks
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(all(test, feature = "bench"))]
|
||||||
mod bench {
|
mod bench {
|
||||||
use test::Bencher;
|
use test::Bencher;
|
||||||
use constants;
|
use constants;
|
||||||
|
|
|
||||||
|
|
@ -358,7 +358,7 @@ mod test {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(all(test, feature = "bench"))]
|
||||||
mod bench {
|
mod bench {
|
||||||
use rand::OsRng;
|
use rand::OsRng;
|
||||||
use test::Bencher;
|
use test::Bencher;
|
||||||
|
|
|
||||||
|
|
@ -1048,7 +1048,7 @@ mod test {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(all(test, feature = "bench"))]
|
||||||
mod bench {
|
mod bench {
|
||||||
use test::Bencher;
|
use test::Bencher;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
#![cfg_attr(not(feature = "std"), no_std)]
|
#![cfg_attr(not(feature = "std"), no_std)]
|
||||||
#![cfg_attr(not(feature = "std"), feature(collections))]
|
#![cfg_attr(not(feature = "std"), feature(collections))]
|
||||||
#![allow(unused_features)]
|
#![allow(unused_features)]
|
||||||
#![feature(test)]
|
#![cfg_attr(feature = "bench", feature(test))]
|
||||||
#![deny(missing_docs)] // refuse to compile if documentation is missing
|
#![deny(missing_docs)] // refuse to compile if documentation is missing
|
||||||
|
|
||||||
//! # curve25519-dalek
|
//! # curve25519-dalek
|
||||||
|
|
@ -33,8 +33,9 @@
|
||||||
//! hatred of the Daleks. Rusty destroys the other Daleks and departs the
|
//! hatred of the Daleks. Rusty destroys the other Daleks and departs the
|
||||||
//! ship, determined to track down and bring an end to the Dalek race.
|
//! ship, determined to track down and bring an end to the Dalek race.
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(all(test, feature = "bench"))]
|
||||||
extern crate test;
|
extern crate test;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
extern crate sha2;
|
extern crate sha2;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -707,7 +707,7 @@ mod test {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(all(test, feature = "bench"))]
|
||||||
mod bench {
|
mod bench {
|
||||||
use rand::OsRng;
|
use rand::OsRng;
|
||||||
use test::Bencher;
|
use test::Bencher;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue