mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-01 08:03:31 +01:00
Merge remote-tracking branch 'isis/bug26398'
This commit is contained in:
commit
e2261e7727
@ -14,3 +14,12 @@ members = [
|
||||
debug = true
|
||||
panic = "abort"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
# If this feature is enabled, test code which calls Tor C code from Rust will
|
||||
# execute with `cargo test`. Due to numerous linker issues (#25386), this is
|
||||
# currently disabled by default. Crates listed here are those which, in their
|
||||
# unittests, doctests, and/or integration tests, call C code.
|
||||
test-c-from-rust = [
|
||||
"crypto/test-c-from-rust",
|
||||
]
|
||||
|
@ -26,3 +26,7 @@ rand = { version = "=0.5.0-pre.2", default-features = false }
|
||||
rand_core = { version = "=0.2.0-pre.0", default-features = false }
|
||||
|
||||
[features]
|
||||
# If this feature is enabled, test code which calls Tor C code from Rust will
|
||||
# execute with `cargo test`. Due to numerous linker issues (#25386), this is
|
||||
# currently disabled by default.
|
||||
test-c-from-rust = []
|
||||
|
@ -165,15 +165,19 @@ impl FixedOutput for Sha512 {
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
#[cfg(feature = "test-c-from-rust")]
|
||||
use digest::Digest;
|
||||
|
||||
#[cfg(feature = "test-c-from-rust")]
|
||||
use super::*;
|
||||
|
||||
#[cfg(feature = "test-c-from-rust")]
|
||||
#[test]
|
||||
fn sha256_default() {
|
||||
let _: Sha256 = Sha256::default();
|
||||
}
|
||||
|
||||
#[cfg(feature = "test-c-from-rust")]
|
||||
#[test]
|
||||
fn sha256_digest() {
|
||||
let mut h: Sha256 = Sha256::new();
|
||||
@ -193,11 +197,13 @@ mod test {
|
||||
assert_eq!(result, expected);
|
||||
}
|
||||
|
||||
#[cfg(feature = "test-c-from-rust")]
|
||||
#[test]
|
||||
fn sha512_default() {
|
||||
let _: Sha512 = Sha512::default();
|
||||
}
|
||||
|
||||
#[cfg(feature = "test-c-from-rust")]
|
||||
#[test]
|
||||
fn sha512_digest() {
|
||||
let mut h: Sha512 = Sha512::new();
|
||||
|
Loading…
Reference in New Issue
Block a user