MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / BOOST_AUTO_TEST_CASE

Function BOOST_AUTO_TEST_CASE

src/tests/base32_tests.cpp:11–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9BOOST_AUTO_TEST_SUITE(base32_tests)
10
11BOOST_AUTO_TEST_CASE(base32_testvectors)
12{
13 static const string vstrIn[] = {"","f","fo","foo","foob","fooba","foobar"};
14 static const string vstrOut[] = {"","my======","mzxq====","mzxw6===","mzxw6yq=","mzxw6ytb","mzxw6ytboi======"};
15 for (unsigned int i=0; i<sizeof(vstrIn)/sizeof(vstrIn[0]); i++)
16 {
17 string strEnc = EncodeBase32(vstrIn[i]);
18 BOOST_CHECK(strEnc == vstrOut[i]);
19 string strDec = DecodeBase32(vstrOut[i]);
20 BOOST_CHECK(strDec == vstrIn[i]);
21 }
22}
23
24BOOST_AUTO_TEST_SUITE_END()

Callers

nothing calls this directly

Calls 2

EncodeBase32Function · 0.85
DecodeBase32Function · 0.85

Tested by

no test coverage detected