30 using namespace pwiz::util;
49 {
"The quick brown fox jumped over the lazy dog.",
50 "VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBkb2cu"},
51 {
"Darren",
"RGFycmVu"},
60 const string& from = testPair.
binary;
61 const string& to = testPair.
text;
62 if (
os_) *
os_ << from <<
" <--> " << to << endl;
65 vector<char> textBuffer;
70 string textString = !textBuffer.empty() ? &textBuffer[0] :
"";
75 vector<char> binaryBuffer;
80 string binaryString = !binaryBuffer.empty() ? &binaryBuffer[0] :
"";
81 unit_assert(binaryCount == (
unsigned int)from.size());
88 if (
os_) *
os_ <<
"test256()\n" << flush;
91 vector<char> from(256);
92 for (
int i=0; i<256; i++)
95 char to[] =
"AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIj"
96 "JCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZH"
97 "SElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWpr"
98 "bG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6P"
99 "kJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKz"
100 "tLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX"
101 "2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7"
105 vector<char> textBuffer;
108 textBuffer[textCount] =
'\0';
109 unit_assert(textCount == (
unsigned int)strlen(to));
113 vector<char> binaryBuffer;
114 binaryBuffer.resize(300);
117 for (
int i=0; i<256; i++)
129 int main(
int argc,
char* argv[])
135 if (argc>1 && !strcmp(argv[1],
"-v"))
138 if (
os_) *
os_ <<
"Base64Test\n";