Fix feature gating on unit tests
Currently we have incorrect feature gating on unit tests and imports leading to unused import warnings.
This commit is contained in:
parent
3344cf6be2
commit
5e3abc5e11
|
@ -204,13 +204,12 @@ impl_fromhex_array!(384);
|
|||
impl_fromhex_array!(512);
|
||||
|
||||
#[cfg(test)]
|
||||
#[cfg(any(feature = "std", feature = "alloc"))]
|
||||
mod tests {
|
||||
use super::*;
|
||||
#[cfg(any(feature = "std", feature = "alloc"))]
|
||||
use internals::hex::exts::DisplayHex;
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "std", feature = "alloc"))]
|
||||
fn hex_roundtrip() {
|
||||
let expected = "0123456789abcdef";
|
||||
let expected_up = "0123456789ABCDEF";
|
||||
|
@ -232,7 +231,6 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "std", feature = "alloc"))]
|
||||
fn hex_error() {
|
||||
let oddlen = "0123456789abcdef0";
|
||||
let badchar1 = "Z123456789abcdef";
|
||||
|
|
|
@ -43,12 +43,10 @@ fn from_engine(e: sha256::HashEngine) -> Hash {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::sha256;
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "std", feature = "alloc"))]
|
||||
fn test() {
|
||||
use crate::{sha256d, Hash, HashEngine};
|
||||
use crate::{sha256, sha256d, Hash, HashEngine};
|
||||
use crate::hex::FromHex;
|
||||
|
||||
#[derive(Clone)]
|
||||
|
|
Loading…
Reference in New Issue