feat(baseN): digitsMap

This commit is contained in:
2024-09-29 13:33:38 +03:00
parent 3c93056416
commit fb15184848
4 changed files with 28 additions and 0 deletions

View File

@ -7,6 +7,14 @@
using namespace baseN;
TEST(baseN, digitsMap)
{
int8_t map[256];
digitsMap(base58::digits, 58, map);
EXPECT_TRUE(std::equal(map, map + 256, base58::map));
EXPECT_THROW(digitsMap("11", 2, map), std::logic_error);
}
TEST(baseN, isValid)
{
std::vector<std::pair<bool, std::string>> tests = {