| 13 | BOOST_AUTO_TEST_SUITE(blech32_tests) |
| 14 | |
| 15 | BOOST_AUTO_TEST_CASE(blech32_testvectors_valid) |
| 16 | { |
| 17 | static const std::string CASES[] = { |
| 18 | "A133NZFWEYK7UT", |
| 19 | "a133nzfweyk7ut", |
| 20 | "an83characterlonghumanreadablepartthatcontainsthenumber1andtheexcludedcharactersbio195jhgldwsn5j", |
| 21 | "abcdef1qpzry9x8gf2tvdw0s3jn54khce6mua7lgmcn7l7t7xve", |
| 22 | "11qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3xldwlutcw2l", |
| 23 | "split1checkupstagehandshakeupstreamerranterredcaperredegneyqml9esp", |
| 24 | "?19dv34t3p4s35", |
| 25 | }; |
| 26 | for (const std::string& str : CASES) { |
| 27 | const auto dec = blech32::Decode(str); |
| 28 | BOOST_CHECK(dec.encoding == blech32::Encoding::BLECH32); |
| 29 | std::string recode = blech32::Encode(blech32::Encoding::BLECH32, dec.hrp, dec.data); |
| 30 | BOOST_CHECK(!recode.empty()); |
| 31 | BOOST_CHECK(CaseInsensitiveEqual(str, recode)); |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | BOOST_AUTO_TEST_CASE(blech32m_testvectors_valid) |
| 36 | { |
nothing calls this directly
no test coverage detected