| 10 | BOOST_FIXTURE_TEST_SUITE(base32_tests, BasicTestingSetup) |
| 11 | |
| 12 | BOOST_AUTO_TEST_CASE(base32_testvectors) |
| 13 | { |
| 14 | static const std::string vstrIn[] = {"","f","fo","foo","foob","fooba","foobar"}; |
| 15 | static const std::string vstrOut[] = {"","my======","mzxq====","mzxw6===","mzxw6yq=","mzxw6ytb","mzxw6ytboi======"}; |
| 16 | for (unsigned int i=0; i<sizeof(vstrIn)/sizeof(vstrIn[0]); i++) |
| 17 | { |
| 18 | std::string strEnc = EncodeBase32(vstrIn[i]); |
| 19 | BOOST_CHECK_EQUAL(strEnc, vstrOut[i]); |
| 20 | std::string strDec = DecodeBase32(vstrOut[i]); |
| 21 | BOOST_CHECK_EQUAL(strDec, vstrIn[i]); |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | BOOST_AUTO_TEST_SUITE_END() |
nothing calls this directly
no test coverage detected