C++ Utilities  4.9.2
Common C++ classes and routines used by my applications such as argument parser, IO and conversion utilities
conversiontests.cpp
Go to the documentation of this file.
1 #include "../conversion/binaryconversion.h"
2 #include "../conversion/stringbuilder.h"
3 #include "../conversion/stringconversion.h"
4 #include "../tests/testutils.h"
5 
6 using namespace TestUtilities;
7 
8 #include <cppunit/TestFixture.h>
9 #include <cppunit/extensions/HelperMacros.h>
10 
11 #include <functional>
12 #include <initializer_list>
13 #include <random>
14 #include <sstream>
15 
16 using namespace std;
17 using namespace ConversionUtilities;
18 
19 using namespace CPPUNIT_NS;
20 
24 class ConversionTests : public TestFixture {
25  CPPUNIT_TEST_SUITE(ConversionTests);
26  CPPUNIT_TEST(testConversionException);
27  CPPUNIT_TEST(testEndianness);
28  CPPUNIT_TEST(testBinaryConversions);
29  CPPUNIT_TEST(testSwapOrderFunctions);
30  CPPUNIT_TEST(testStringEncodingConversions);
31  CPPUNIT_TEST(testStringConversions);
32  CPPUNIT_TEST(testStringBuilder);
33  CPPUNIT_TEST_SUITE_END();
34 
35 public:
37 
38  void setUp()
39  {
40  }
41  void tearDown()
42  {
43  }
44 
45  void testConversionException();
46  void testEndianness();
47  void testBinaryConversions();
48  void testSwapOrderFunctions();
49  void testStringEncodingConversions();
50  void testStringConversions();
51  void testStringBuilder();
52 
53 private:
54  template <typename intType>
55  void testConversion(const char *message, function<void(intType, char *)> vice, function<intType(const char *)> verca, intType min, intType max);
56 
57  char m_buff[8];
58  random_device m_randomDevice;
59  mt19937 m_randomEngine;
60 };
61 
63 
65  : m_randomDevice()
66  , m_randomEngine(m_randomDevice())
67 {
68 }
69 
71 {
72  CPPUNIT_ASSERT(!strcmp("unable to convert", ConversionException().what()));
73 }
74 
79 {
80  union {
81  uint32_t integer;
82  char characters[4];
83  } test = { 0x01020304 };
84 #if defined(CONVERSION_UTILITIES_BYTE_ORDER_BIG_ENDIAN)
85  // test whether macro definitions are consistent
86  CPPUNIT_ASSERT(CONVERSION_UTILITIES_IS_BYTE_ORDER_BIG_ENDIAN == true);
87  CPPUNIT_ASSERT(CONVERSION_UTILITIES_IS_BYTE_ORDER_LITTLE_ENDIAN == false);
88  // test whether byte order assumption is correct
89  CPPUNIT_ASSERT_MESSAGE("Byte order assumption (big-endian) is wrong", test.characters[0] == 0x01);
90 #elif defined(CONVERSION_UTILITIES_BYTE_ORDER_LITTLE_ENDIAN)
91  // test whether macro definitions are consistent
92  CPPUNIT_ASSERT(CONVERSION_UTILITIES_IS_BYTE_ORDER_BIG_ENDIAN == false);
93  CPPUNIT_ASSERT(CONVERSION_UTILITIES_IS_BYTE_ORDER_LITTLE_ENDIAN == true);
94  // test whether byte order assumption is correct
95  CPPUNIT_ASSERT_MESSAGE("Byte order assumption (little-endian) is wrong", test.characters[0] == 0x04);
96 #else
97  CPPUNIT_FAIL("There is not valid byte order assumption");
98 #endif
99 }
100 
101 template <typename intType>
102 void ConversionTests::testConversion(
103  const char *message, function<void(intType, char *)> vice, function<intType(const char *)> versa, intType min, intType max)
104 {
105  const intType random = uniform_int_distribution<intType>(min, max)(m_randomEngine);
106  stringstream msg;
107  msg << message << '(' << hex << '0' << 'x' << random << ')';
108  vice(random, m_buff);
109  CPPUNIT_ASSERT_MESSAGE(msg.str(), versa(m_buff) == random);
110 }
111 
112 #define TEST_TYPE(endianness, function) decltype(endianness::function(m_buff))
113 
114 #define TEST_CONVERSION(function, endianness) \
115  testConversion<TEST_TYPE(endianness, function)>("testing " #function, \
116  static_cast<void (*)(TEST_TYPE(endianness, function), char *)>(&endianness::getBytes), endianness::function, \
117  numeric_limits<TEST_TYPE(endianness, function)>::min(), numeric_limits<TEST_TYPE(endianness, function)>::max())
118 
119 #define TEST_BE_CONVERSION(function) TEST_CONVERSION(function, BE)
120 
121 #define TEST_LE_CONVERSION(function) TEST_CONVERSION(function, LE)
122 
123 #define TEST_CUSTOM_CONVERSION(vice, versa, endianness, min, max) \
124  testConversion<TEST_TYPE(endianness, versa)>( \
125  "testing " #versa, static_cast<void (*)(TEST_TYPE(endianness, versa), char *)>(&endianness::vice), endianness::versa, min, max)
126 
134 {
135  // test to...() / getBytes() with random numbers
136  for (byte b = 1; b < 100; ++b) {
137  TEST_BE_CONVERSION(toUInt16);
138  TEST_BE_CONVERSION(toUInt32);
139  TEST_BE_CONVERSION(toUInt64);
140  TEST_LE_CONVERSION(toUInt16);
141  TEST_LE_CONVERSION(toUInt32);
142  TEST_LE_CONVERSION(toUInt64);
143  TEST_BE_CONVERSION(toInt16);
144  TEST_BE_CONVERSION(toInt32);
145  TEST_BE_CONVERSION(toInt64);
146  TEST_LE_CONVERSION(toInt16);
147  TEST_LE_CONVERSION(toInt32);
148  TEST_LE_CONVERSION(toInt64);
149  TEST_CUSTOM_CONVERSION(getBytes24, toUInt24, BE, 0, 0xFFFFFF);
150  TEST_CUSTOM_CONVERSION(getBytes24, toUInt24, LE, 0, 0xFFFFFF);
151  }
152 }
153 
158 {
159  CPPUNIT_ASSERT(swapOrder(static_cast<uint16>(0x7825)) == 0x2578);
160  CPPUNIT_ASSERT(swapOrder(static_cast<uint32>(0x12345678)) == 0x78563412);
161  CPPUNIT_ASSERT(swapOrder(static_cast<uint64>(0x1122334455667788)) == 0x8877665544332211);
162 }
163 
167 void assertEqual(const char *message, const byte *expectedValues, size_t expectedSize, const StringData &actualValues)
168 {
169  // check whether number of elements matches
170  CPPUNIT_ASSERT_EQUAL_MESSAGE(message, expectedSize, actualValues.second);
171  // check whether contents match
172  auto *end = expectedValues + expectedSize;
173  auto *i = reinterpret_cast<byte *>(actualValues.first.get());
174  for (; expectedValues != end; ++expectedValues, ++i) {
175  CPPUNIT_ASSERT_EQUAL_MESSAGE(message, asHexNumber(*expectedValues), asHexNumber(*i));
176  }
177 }
178 
179 #if CONVERSION_UTILITIES_IS_BYTE_ORDER_LITTLE_ENDIAN == true
180 #define LE_STR_FOR_ENDIANNESS(name) name##LE##String
181 #define BE_STR_FOR_ENDIANNESS(name) name##BE##String
182 #elif CONVERSION_UTILITIES_IS_BYTE_ORDER_BIG_ENDIAN == true
183 #define LE_STR_FOR_ENDIANNESS(name) name##BE##String
184 #define BE_STR_FOR_ENDIANNESS(name) name##LE##String
185 #endif
186 
201 {
202  // define test string "ABCD" for the different encodings
203  const byte simpleString[] = { 'A', 'B', 'C', 'D' };
204  const uint16 simpleUtf16LEString[] = { 0x0041, 0x0042, 0x0043, 0x0044 };
205  const uint16 simpleUtf16BEString[] = { 0x4100, 0x4200, 0x4300, 0x4400 };
206  // define test string "ABĂ–CD" for the different encodings
207  const byte latin1String[] = { 'A', 'B', 0xD6, 'C', 'D' };
208  const byte utf8String[] = { 'A', 'B', 0xC3, 0x96, 'C', 'D' };
209  const uint16 utf16LEString[] = { 0x0041, 0x0042, 0x00D6, 0x0043, 0x0044 };
210  const uint16 utf16BEString[] = { 0x4100, 0x4200, 0xD600, 0x4300, 0x4400 };
211  // test conversion to UTF-8
212  assertEqual("Latin-1 to UTF-8 (simple)", simpleString, 4, convertLatin1ToUtf8(reinterpret_cast<const char *>(simpleString), 4));
213  assertEqual("Latin-1 to UTF-8", utf8String, 6, convertLatin1ToUtf8(reinterpret_cast<const char *>(latin1String), 5));
214  assertEqual(
215  "UTF-16LE to UTF-8 (simple)", simpleString, 4, convertUtf16LEToUtf8(reinterpret_cast<const char *>(LE_STR_FOR_ENDIANNESS(simpleUtf16)), 8));
216  assertEqual("UTF-16LE to UTF-8", utf8String, 6, convertUtf16LEToUtf8(reinterpret_cast<const char *>(LE_STR_FOR_ENDIANNESS(utf16)), 10));
217  assertEqual(
218  "UTF-16BE to UTF-8 (simple)", simpleString, 4, convertUtf16BEToUtf8(reinterpret_cast<const char *>(BE_STR_FOR_ENDIANNESS(simpleUtf16)), 8));
219  assertEqual("UTF-16BE to UTF-8", utf8String, 6, convertUtf16BEToUtf8(reinterpret_cast<const char *>(BE_STR_FOR_ENDIANNESS(utf16)), 10));
220  // test conversion from UTF-8
221  assertEqual("UTF-8 to Latin-1 (simple)", simpleString, 4, convertUtf8ToLatin1(reinterpret_cast<const char *>(simpleString), 4));
222  assertEqual("UTF-8 to Latin-1", latin1String, 5, convertUtf8ToLatin1(reinterpret_cast<const char *>(utf8String), 6));
223  assertEqual("UTF-8 to UFT-16LE (simple)", reinterpret_cast<const byte *>(LE_STR_FOR_ENDIANNESS(simpleUtf16)), 8,
224  convertUtf8ToUtf16LE(reinterpret_cast<const char *>(simpleString), 4));
225  assertEqual("UTF-8 to UFT-16LE", reinterpret_cast<const byte *>(LE_STR_FOR_ENDIANNESS(utf16)), 10,
226  convertUtf8ToUtf16LE(reinterpret_cast<const char *>(utf8String), 6));
227  assertEqual("UTF-8 to UFT-16BE (simple)", reinterpret_cast<const byte *>(BE_STR_FOR_ENDIANNESS(simpleUtf16)), 8,
228  convertUtf8ToUtf16BE(reinterpret_cast<const char *>(simpleString), 4));
229  assertEqual("UTF-8 to UFT-16BE", reinterpret_cast<const byte *>(BE_STR_FOR_ENDIANNESS(utf16)), 10,
230  convertUtf8ToUtf16BE(reinterpret_cast<const char *>(utf8String), 6));
231  CPPUNIT_ASSERT_THROW(convertString("invalid charset", "UTF-8", "foo", 3, 1.0f), ConversionException);
232 }
233 
238 {
239  // stringToNumber() / numberToString() with zero and random numbers
240  CPPUNIT_ASSERT_EQUAL("0"s, numberToString<unsigned int>(0));
241  CPPUNIT_ASSERT_EQUAL("0"s, numberToString<signed int>(0));
242  uniform_int_distribution<int64> randomDistSigned(numeric_limits<int64>::min());
243  uniform_int_distribution<uint64> randomDistUnsigned(0);
244  const string stringMsg("string"), wideStringMsg("wide string"), bufferMsg("buffer");
245  for (byte b = 1; b < 100; ++b) {
246  auto signedRandom = randomDistSigned(m_randomEngine);
247  auto unsignedRandom = randomDistUnsigned(m_randomEngine);
248  for (const auto base : initializer_list<byte>{ 2, 8, 10, 16 }) {
249  const auto asString = numberToString<uint64, string>(unsignedRandom, static_cast<string::value_type>(base));
250  const auto asWideString = numberToString<uint64, wstring>(unsignedRandom, base);
251  CPPUNIT_ASSERT_EQUAL_MESSAGE(stringMsg, unsignedRandom, stringToNumber<uint64>(asString, static_cast<string::value_type>(base)));
252  CPPUNIT_ASSERT_EQUAL_MESSAGE(wideStringMsg, unsignedRandom, stringToNumber<uint64>(asWideString, base));
253  CPPUNIT_ASSERT_EQUAL_MESSAGE(bufferMsg, unsignedRandom, bufferToNumber<uint64>(asString.data(), asString.size(), base));
254  }
255  for (const auto base : initializer_list<byte>{ 10 }) {
256  const auto asString = numberToString<int64, string>(signedRandom, static_cast<string::value_type>(base));
257  const auto asWideString = numberToString<int64, wstring>(signedRandom, base);
258  CPPUNIT_ASSERT_EQUAL_MESSAGE(stringMsg, signedRandom, stringToNumber<int64>(asString, static_cast<string::value_type>(base)));
259  CPPUNIT_ASSERT_EQUAL_MESSAGE(wideStringMsg, signedRandom, stringToNumber<int64>(asWideString, base));
260  CPPUNIT_ASSERT_EQUAL_MESSAGE(bufferMsg, signedRandom, bufferToNumber<int64>(asString.data(), asString.size(), base));
261  }
262  }
263 
264  // stringToNumber() with spaces at the beginning, leading zeroes, different types and other corner cases
265  CPPUNIT_ASSERT_EQUAL(1, stringToNumber<int32>("01"));
266  CPPUNIT_ASSERT_EQUAL(1, stringToNumber<int32>(L"01"s));
267  CPPUNIT_ASSERT_EQUAL(1, stringToNumber<int32>(u"01"s));
268  CPPUNIT_ASSERT_EQUAL(-23, stringToNumber<int32>(" - 023"s));
269  CPPUNIT_ASSERT_EQUAL(-23, bufferToNumber<int32>(" - 023", 6));
270  CPPUNIT_ASSERT_EQUAL(1u, stringToNumber<uint32>("01"));
271  CPPUNIT_ASSERT_EQUAL(1u, stringToNumber<uint32>(L"01"s));
272  CPPUNIT_ASSERT_EQUAL(1u, stringToNumber<uint32>(u"01"s));
273  CPPUNIT_ASSERT_EQUAL(23u, stringToNumber<uint32>(" 023"s));
274  CPPUNIT_ASSERT_EQUAL(23u, bufferToNumber<uint32>(" 023", 5));
275  CPPUNIT_ASSERT_EQUAL(255u, stringToNumber<uint32>("fF", 16));
276  CPPUNIT_ASSERT_THROW(stringToNumber<uint32>("fF", 15), ConversionException);
277  CPPUNIT_ASSERT_THROW(stringToNumber<uint32>("(", 15), ConversionException);
278 
279  // interpretIntegerAsString()
280  CPPUNIT_ASSERT_EQUAL("TEST"s, interpretIntegerAsString<uint32>(0x54455354));
281 
282  // splitString() / joinStrings()
283  vector<string> splitTestExpected({ "1", "2,3" });
284  vector<string> splitTestActual = splitString<vector<string>>("1,2,3"s, ","s, EmptyPartsTreat::Keep, 2);
285  CPPUNIT_ASSERT_EQUAL(splitTestExpected, splitTestActual);
286  splitTestExpected = { "1", "2,3", "4,,5" };
287  splitTestActual = splitString<vector<string>>("1,2,,3,4,,5"s, ","s, EmptyPartsTreat::Merge, 3);
288  CPPUNIT_ASSERT_EQUAL(splitTestExpected, splitTestActual);
289  string splitJoinTest = joinStrings(splitString<vector<string>>(",a,,ab,ABC,s"s, ","s, EmptyPartsTreat::Keep), " "s, false, "("s, ")"s);
290  CPPUNIT_ASSERT_EQUAL("() (a) () (ab) (ABC) (s)"s, splitJoinTest);
291  splitJoinTest = joinStrings(splitString<vector<string>>(",a,,ab,ABC,s"s, ","s, EmptyPartsTreat::Keep), " "s, true, "("s, ")"s);
292  CPPUNIT_ASSERT_EQUAL("(a) (ab) (ABC) (s)"s, splitJoinTest);
293  splitJoinTest = joinStrings(splitString<vector<string>>(",a,,ab,ABC,s"s, ","s, EmptyPartsTreat::Omit), " "s, false, "("s, ")"s);
294  CPPUNIT_ASSERT_EQUAL("(a) (ab) (ABC) (s)"s, splitJoinTest);
295  splitJoinTest = joinStrings(splitString<vector<string>>(",a,,ab,ABC,s"s, ","s, EmptyPartsTreat::Merge), " "s, false, "("s, ")"s);
296  CPPUNIT_ASSERT_EQUAL("(a,ab) (ABC) (s)"s, splitJoinTest);
297 
298  // findAndReplace()
299  string findReplaceTest("findAndReplace()");
300  findAndReplace<string>(findReplaceTest, "And", "Or");
301  CPPUNIT_ASSERT_EQUAL("findOrReplace()"s, findReplaceTest);
302 
303  // startsWith()
304  CPPUNIT_ASSERT(!startsWith<string>(findReplaceTest, "findAnd"));
305  CPPUNIT_ASSERT(startsWith<string>(findReplaceTest, "findOr"));
306 
307  // containsSubstrings()
308  CPPUNIT_ASSERT(containsSubstrings<string>("this string contains foo and bar", { "foo", "bar" }));
309  CPPUNIT_ASSERT(!containsSubstrings<string>("this string contains foo and bar", { "bar", "foo" }));
310 
311  // truncateString()
312  string truncateTest("foo bar ");
313  truncateString(truncateTest, ' ');
314  CPPUNIT_ASSERT_EQUAL("foo"s, truncateTest);
315 
316  // encodeBase64() / decodeBase64() with random data
317  uniform_int_distribution<byte> randomDistChar;
318  byte originalBase64Data[4047];
319  for (byte &c : originalBase64Data) {
320  c = randomDistChar(m_randomEngine);
321  }
322  const auto encodedBase64Data = encodeBase64(originalBase64Data, sizeof(originalBase64Data));
323  auto decodedBase64Data = decodeBase64(encodedBase64Data.data(), encodedBase64Data.size());
324  CPPUNIT_ASSERT(decodedBase64Data.second == sizeof(originalBase64Data));
325  for (unsigned int i = 0; i < sizeof(originalBase64Data); ++i) {
326  CPPUNIT_ASSERT(decodedBase64Data.first[i] == originalBase64Data[i]);
327  }
328 
329  // dataSizeToString(), bitrateToString()
330  // TODO
331 }
332 
333 string functionTakingString(const string &str)
334 {
335  return str;
336 }
337 
339 {
340  // conversion of string-tuple to string (the actual string builder)
341  const tuple<const char *, string, int, const char *> tuple("string1", "string2", 1234, "string3");
342  CPPUNIT_ASSERT_EQUAL(string("string1string21234string3"), tupleToString(tuple));
343  CPPUNIT_ASSERT_EQUAL(string("foobarfoo2bar2"), tupleToString(string("foo") % "bar" % string("foo2") % "bar2"));
344  CPPUNIT_ASSERT_EQUAL(string("v2.3.0"), argsToString("v2.", 3, '.', 0));
345 
346  // construction of string-tuple and final conversion to string works
347  CPPUNIT_ASSERT_EQUAL_MESSAGE(
348  "result can be passed to any function taking a std::string"s, "123456789"s, functionTakingString("12" % string("34") % '5' % 67 + "89"));
349  constexpr double velocityExample = 27.0;
350  CPPUNIT_ASSERT_EQUAL_MESSAGE("real-word example"s, "velocity: 27 km/h (7.5 m/s)"s,
351  functionTakingString("velocity: " % numberToString(velocityExample) % " km/h (" % numberToString(velocityExample / 3.6) + " m/s)"));
352  CPPUNIT_ASSERT_EQUAL_MESSAGE(
353  "regular + operator still works (no problems with ambiguity)"s, "regular + still works"s, "regular"s + " + still works");
354 }
CPP_UTILITIES_EXPORT StringData convertUtf8ToUtf16LE(const char *inputBuffer, std::size_t inputBufferSize)
Converts the specified UTF-8 string to UTF-16 (little-endian).
CPP_UTILITIES_EXPORT std::string encodeBase64(const byte *data, uint32 dataSize)
Encodes the specified data to Base64.
void testSwapOrderFunctions()
Tests swap order functions.
The ConversionException class is thrown by the various conversion functions of this library when a co...
CPP_UTILITIES_EXPORT StringData convertUtf16BEToUtf8(const char *inputBuffer, std::size_t inputBufferSize)
Converts the specified UTF-16 (big-endian) string to UTF-8.
void testBinaryConversions()
Tests most important binary conversions.
constexpr StringType argsToString(Args &&... args)
STL namespace.
#define TEST_LE_CONVERSION(function)
CPPUNIT_TEST_SUITE_REGISTRATION(ConversionTests)
CPP_UTILITIES_EXPORT void truncateString(std::string &str, char terminationChar='\0')
Truncates all characters after the first occurrence of the specified terminationChar and the terminat...
void testStringConversions()
Tests miscellaneous string conversions.
StringType numberToString(IntegralType number, typename StringType::value_type base=10)
Converts the given number to its equivalent string representation using the specified base...
void testEndianness()
Tests whether macros for endianness are correct.
#define TEST_CUSTOM_CONVERSION(vice, versa, endianness, min, max)
CPP_UTILITIES_EXPORT int random(int lowerbounds, int upperbounds)
Returns a pseudo random number between lowerbounds and upperbounds.
Definition: math.cpp:17
void testConversionException()
#define BE_STR_FOR_ENDIANNESS(name)
Selects right string for big-endian checks.
CPP_UTILITIES_EXPORT StringData convertUtf8ToUtf16BE(const char *inputBuffer, std::size_t inputBufferSize)
Converts the specified UTF-8 string to UTF-16 (big-endian).
string functionTakingString(const string &str)
CPP_UTILITIES_EXPORT constexpr uint16 swapOrder(uint16 value)
Swaps the byte order of the specified 16-bit unsigned integer.
Contains classes and functions utilizing creating of test applications.
Definition: testutils.h:10
#define TEST_BE_CONVERSION(function)
CPP_UTILITIES_EXPORT StringData convertUtf8ToLatin1(const char *inputBuffer, std::size_t inputBufferSize)
Converts the specified UTF-8 string to Latin-1.
Contains several functions providing conversions between different data types.
std::pair< std::unique_ptr< char[], StringDataDeleter >, std::size_t > StringData
Type used to return string encoding conversion result.
CPP_UTILITIES_EXPORT StringData convertUtf16LEToUtf8(const char *inputBuffer, std::size_t inputBufferSize)
Converts the specified UTF-16 (little-endian) string to UTF-8.
AsHexNumber< T > asHexNumber(const T &value)
Wraps a value to be printed using the hex system in the error case when asserted with cppunit (or sim...
Definition: testutils.h:165
void testStringEncodingConversions()
Tests string encoding conversions.
void assertEqual(const char *message, const byte *expectedValues, size_t expectedSize, const StringData &actualValues)
Internally used for string encoding tests to check results.
Container::value_type joinStrings(const Container &strings, const typename Container::value_type &delimiter=typename Container::value_type(), bool omitEmpty=false, const typename Container::value_type &leftClosure=typename Container::value_type(), const typename Container::value_type &rightClosure=typename Container::value_type())
Joins the given strings using the specified delimiter.
CPP_UTILITIES_EXPORT StringData convertString(const char *fromCharset, const char *toCharset, const char *inputBuffer, std::size_t inputBufferSize, float outputBufferSizeFactor=1.0f)
Converts the specified string from one character set to another.
std::uint8_t byte
unsigned byte
Definition: types.h:14
CPP_UTILITIES_EXPORT StringData convertLatin1ToUtf8(const char *inputBuffer, std::size_t inputBufferSize)
Converts the specified Latin-1 string to UTF-8.
#define LE_STR_FOR_ENDIANNESS(name)
Selects right string for little-endian checks.
StringType tupleToString(const std::tuple< Args... > &tuple)
Concatenates all strings hold by the specified tuple.
Container splitString(const typename Container::value_type &string, const typename Container::value_type &delimiter, EmptyPartsTreat emptyPartsRole=EmptyPartsTreat::Keep, int maxParts=-1)
Splits the given string at the specified delimiter.
CPP_UTILITIES_EXPORT std::pair< std::unique_ptr< byte[]>, uint32 > decodeBase64(const char *encodedStr, const uint32 strSize)
Decodes the specified Base64 encoded string.
The ConversionTests class tests classes and methods of the ConversionUtilities namespace.
std::uint16_t uint16
unsigned 16-bit integer
Definition: types.h:39