#include "../conversion/binaryconversion.h"
#include "../conversion/stringbuilder.h"
#include "../conversion/stringconversion.h"
#include "../tests/testutils.h"
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <functional>
#include <initializer_list>
#include <random>
#include <sstream>
Go to the source code of this file.
◆ TEST_BE_CONVERSION
◆ TEST_CONVERSION
#define TEST_CONVERSION |
( |
| function, |
|
|
| endianness ) |
Value:
#define TEST_TYPE(endianness, function)
IntegralType stringToNumber(const StringType &string, BaseType base=10)
Converts the given string to an unsigned/signed number assuming string uses the specified base.
constexpr T max(T first, T second)
Returns the greatest of the given items.
constexpr T min(T first, T second)
Returns the smallest of the given items.
Definition at line 127 of file conversiontests.cpp.
◆ TEST_CUSTOM_CONVERSION
#define TEST_CUSTOM_CONVERSION |
( |
| vice, |
|
|
| versa, |
|
|
| endianness, |
|
|
| min, |
|
|
| max ) |
◆ TEST_LE_CONVERSION
◆ TEST_TYPE
#define TEST_TYPE |
( |
| endianness, |
|
|
| function ) decltype(endianness::function(m_buff)) |
◆ assertEqual()
void assertEqual |
( |
const char * | message, |
|
|
const std::uint8_t * | expectedValues, |
|
|
size_t | expectedSize, |
|
|
const StringData & | actualValues ) |
Internally used for string encoding tests to check results.
Definition at line 180 of file conversiontests.cpp.
◆ CPPUNIT_TEST_SUITE_REGISTRATION()