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:
Isis Lovecruft 2017-03-14 01:59:08 +00:00
parent 3882a41d27
commit f6930997d2
Failed to extract signature
6 changed files with 8 additions and 6 deletions

View file

@ -36,6 +36,7 @@ version = "0.4"
default = ["std"]
std = ["rand"]
yolocrypto = []
bench = []
# The development profile, used for `cargo build`.
[profile.dev]

View file

@ -1354,7 +1354,7 @@ mod test {
// Benchmarks
// ------------------------------------------------------------------------
#[cfg(test)]
#[cfg(all(test, feature = "bench"))]
mod bench {
use test::Bencher;
use constants;

View file

@ -358,7 +358,7 @@ mod test {
}
}
#[cfg(test)]
#[cfg(all(test, feature = "bench"))]
mod bench {
use rand::OsRng;
use test::Bencher;

View file

@ -1048,7 +1048,7 @@ mod test {
}
}
#[cfg(test)]
#[cfg(all(test, feature = "bench"))]
mod bench {
use test::Bencher;

View file

@ -12,7 +12,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(not(feature = "std"), feature(collections))]
#![allow(unused_features)]
#![feature(test)]
#![cfg_attr(feature = "bench", feature(test))]
#![deny(missing_docs)] // refuse to compile if documentation is missing
//! # curve25519-dalek
@ -33,8 +33,9 @@
//! 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.
#[cfg(test)]
#[cfg(all(test, feature = "bench"))]
extern crate test;
#[cfg(test)]
extern crate sha2;

View file

@ -707,7 +707,7 @@ mod test {
}
}
#[cfg(test)]
#[cfg(all(test, feature = "bench"))]
mod bench {
use rand::OsRng;
use test::Bencher;