| 29 | using HashArray = std::array<WasmEdge::Byte, 32>; |
| 30 | |
| 31 | TEST(Blake3Test, Empty) { |
| 32 | const auto Expect = |
| 33 | "\xaf\x13\x49\xb9\xf5\xf9\xa1\xa6\xa0\x40\x4d\xea\x36\xdc\xc9\x49\x9b\xcb" |
| 34 | "\x25\xc9\xad\xc1\x12\xb7\xcc\x9a\x93\xca\xe4\x1f\x32\x62"sv; |
| 35 | WasmEdge::AOT::Blake3 Blake3; |
| 36 | HashArray Output; |
| 37 | Blake3.finalize(Output); |
| 38 | for (size_t I = 0; I < Output.size(); ++I) { |
| 39 | EXPECT_EQ(Output[I], static_cast<WasmEdge::Byte>(Expect[I])); |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | TEST(Blake3Test, Small) { |
| 44 | const auto Data = "a"sv; |