From f1fbd5ac3f7556b2ca51159c45099782343e6d77 Mon Sep 17 00:00:00 2001 From: Orange Date: Wed, 29 Jul 2026 03:05:26 +0300 Subject: [PATCH] fix --- tests/general/unit_test_hashing.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/general/unit_test_hashing.cpp b/tests/general/unit_test_hashing.cpp index c4386ef..b0b2a4a 100644 --- a/tests/general/unit_test_hashing.cpp +++ b/tests/general/unit_test_hashing.cpp @@ -25,10 +25,8 @@ TEST(unit_test_hashing, base64_encode) TEST(unit_test_hashing, base64_decode) { - constexpr auto decoded = omath::hashing::base64_decode("Zm9v"); - - static_assert(decoded.has_value()); - static_assert(decoded.value() == "foo"); + static_assert(omath::hashing::base64_decode("Zm9v").has_value()); + static_assert(omath::hashing::base64_decode("Zm9v").value() == "foo"); EXPECT_EQ(omath::hashing::base64_decode("Zm9vYmFy").value(), "foobar"); EXPECT_EQ(omath::hashing::base64_decode("Zm9v=").error(), omath::hashing::Base64Error::INVALID_LENGTH); EXPECT_EQ(omath::hashing::base64_decode("Zm?v").error(), omath::hashing::Base64Error::INVALID_CHARACTER);