From af633c12b407588eb50789a52c33ed839da9be04 Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Wed, 12 Jul 2023 23:31:14 -0700 Subject: [PATCH] fix some more tests Note that the new guts module doesn't yet have no_std support at all. --- rust/blake3_guts/src/test.rs | 4 ++-- src/test.rs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/rust/blake3_guts/src/test.rs b/rust/blake3_guts/src/test.rs index 2a49159a3..cb0fbaf4b 100644 --- a/rust/blake3_guts/src/test.rs +++ b/rust/blake3_guts/src/test.rs @@ -126,7 +126,7 @@ pub fn test_hash_chunks_vs_portable(test_impl: &Implementation) { portable::implementation().hash_chunks( input2, &TEST_KEY, - initial_counter + degree as u64, + initial_counter + test_impl.degree() as u64, KEYED_HASH, portable_right, ); @@ -137,7 +137,7 @@ pub fn test_hash_chunks_vs_portable(test_impl: &Implementation) { test_impl.hash_chunks( input2, &TEST_KEY, - initial_counter + degree as u64, + initial_counter + test_impl.degree() as u64, KEYED_HASH, test_right, ); diff --git a/src/test.rs b/src/test.rs index fc56aface..5a022239b 100644 --- a/src/test.rs +++ b/src/test.rs @@ -293,6 +293,7 @@ fn test_xof_seek() { #[test] fn test_xof_xor() { for step in [32, 63, 64, 128, 303] { + #[cfg(feature = "std")] dbg!(step); let mut ref_hasher = reference_impl::Hasher::new(); ref_hasher.update(b"foo");