@@ -24,9 +24,15 @@ BOOST_AUTO_TEST_SUITE(sha256_tests_)
2424constexpr auto vector = with_sse41 || with_avx2 || with_avx512;
2525constexpr auto native = with_shani || with_neon;
2626
27+ // Other test vectors are dependent upon the correctness of these.
28+ static_assert (sha256::hash(sha256::byte_t {}) == sha_byte256);
29+ static_assert (sha256::hash(sha256::half_t {}) == sha_half256);
30+ static_assert (sha256::hash(sha256::block_t {}) == sha_full256);
31+
2732BOOST_AUTO_TEST_CASE (sha256__hash__null_hash__expected)
2833{
2934 // Correlate non-const-evaluated to const-evaluated.
35+ BOOST_REQUIRE_EQUAL (sha256::hash (sha256::byte_t {}), sha_byte256);
3036 BOOST_REQUIRE_EQUAL (sha256::hash (sha256::half_t {}), sha_half256);
3137 BOOST_REQUIRE_EQUAL (sha256::hash (sha256::block_t {}), sha_full256);
3238}
@@ -201,14 +207,6 @@ BOOST_AUTO_TEST_CASE(sha256__hash__quart_blocks__expected)
201207 BOOST_CHECK_EQUAL (sha256::hash (sha256::quart_t { 0 }, sha256::quart_t { 0 }), expected);
202208}
203209
204- BOOST_AUTO_TEST_CASE (sha256__hash__byte__expected)
205- {
206- // github.com/mit-dci/rustreexo/blob/main/src/accumulator/node_hash.rs#L338
207- constexpr auto expected = base16_array (" 6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d" );
208- static_assert (sha256::hash (0 ) == expected);
209- BOOST_CHECK_EQUAL (sha256::hash (0 ), expected);
210- }
211-
212210// sha256::double_hash
213211BOOST_AUTO_TEST_CASE (sha256__double_hash__full_block__expected)
214212{
0 commit comments