Meson instead of Make

This commit is contained in:
2026-01-13 13:08:46 +03:00
parent 2cd45c0750
commit bae33de997
22 changed files with 239 additions and 448 deletions

23
test/base58.cpp Normal file
View File

@ -0,0 +1,23 @@
#include <utility>
#include <basen/base58.hpp>
#include <basen/Exception.hpp>
#include <basen/hex.hpp>
#include <gtest/gtest.h>
using namespace base58;
std::pair<std::string, std::string> test = {
"003812e515df45235c6bcc2233ac9d0c4ebbd781de",
"167VUagc755PbQoB7cCTfTPjbQ5Nk6fEuD",
};
TEST(base58, encodeCheck)
{
EXPECT_EQ(encodeCheck(hex::decode(test.first)), test.second);
}
TEST(base58, decodeCheck)
{
EXPECT_EQ(test.first, hex::encode(decodeCheck(test.second)));
EXPECT_THROW(decodeCheck("incorrect"), basen::Exception);
}