jaulib v1.3.0
Jau Support Library (C++, Java, ..)
|
#include <cassert>
#include <cinttypes>
#include <cstring>
#include <jau/test/catch2_ext.hpp>
#include <jau/basic_types.hpp>
#include <endian.h>
Go to the source code of this file.
Namespaces | |
namespace | test_impl |
Test private impl namespace. | |
Functions | |
template<typename Value_type > | |
static bool | compare_values (const Value_type a, const Value_type b) |
template<typename Value_type > | |
static Value_type | compose (const uint8_t lowest_value, const jau::endian_t le_or_be) |
template<typename Value_type > | |
static Value_type | compose (const uint8_t lowest_value, const jau::lb_endian_t le_or_be) |
static uint16_t | compose (const uint8_t n1, const uint8_t n2) |
static uint32_t | compose (const uint8_t n1, const uint8_t n2, const uint8_t n3, const uint8_t n4) |
static uint64_t | compose (const uint8_t n1, const uint8_t n2, const uint8_t n3, const uint8_t n4, const uint8_t n5, const uint8_t n6, const uint8_t n7, const uint8_t n8) |
constexpr bool | isLittleEndian2 () noexcept |
Just demonstrating usage of our type-traits in a convenient API manner w/o requiring to add the dummy template type. More... | |
template<class Dummy_type > | |
constexpr bool | test_impl::isLittleEndian2_impl (std::enable_if_t< jau::has_endian_little_v< Dummy_type >, bool >=true) noexcept |
template<class Dummy_type > | |
constexpr bool | test_impl::isLittleEndian2_impl (std::enable_if_t<!jau::has_endian_little_v< Dummy_type >, bool >=true) noexcept |
template<typename Value_type > | |
static void | print (const Value_type a) |
template<typename Value_type > | |
static void | test_byteorder (const Value_type v_cpu, const Value_type v_le, const Value_type v_be) |
TEST_CASE ("Endianess Test 00", "[endian]") | |
TEST_CASE ("HexString from and to byte vector conversion - Test 04", "[hexstring]") | |
TEST_CASE ("Integer Get/Put in CPU Byte Order Test 02", "[byteorder][get][put]") | |
TEST_CASE ("Integer Get/Put in explicit Byte Order Test 03", "[byteorder][get][put]") | |
TEST_CASE ("Integer Type Byte Order Test 01", "[byteorder][bswap]") | |
TEST_CASE ("Integer Type Test Test 05", "[integer][type]") | |
template<typename Value_type > | |
static void | test_value_cpu (const Value_type v1, const Value_type v2, const Value_type v3) |
template<typename Value_type > | |
static void | test_value_littlebig (const Value_type v_cpu, const Value_type v_le, const Value_type v_be) |
Variables | |
static constexpr bool | VERBOSE = false |
|
constexprnoexcept |
Just demonstrating usage of our type-traits in a convenient API manner w/o requiring to add the dummy template type.
Definition at line 62 of file test_basictypeconv.cpp.
TEST_CASE | ( | "Endianess Test 00" | , |
"" | [endian] | ||
) |
Definition at line 67 of file test_basictypeconv.cpp.
|
static |
Definition at line 94 of file test_basictypeconv.cpp.
|
static |
Definition at line 102 of file test_basictypeconv.cpp.
|
static |
Definition at line 116 of file test_basictypeconv.cpp.
|
static |
Definition at line 152 of file test_basictypeconv.cpp.
|
static |
Definition at line 159 of file test_basictypeconv.cpp.
|
static |
Definition at line 168 of file test_basictypeconv.cpp.
|
static |
Definition at line 184 of file test_basictypeconv.cpp.
|
static |
Definition at line 200 of file test_basictypeconv.cpp.
TEST_CASE | ( | "Integer Type Byte Order Test 01" | , |
"" | [byteorder][bswap] | ||
) |
Definition at line 204 of file test_basictypeconv.cpp.
|
static |
Definition at line 244 of file test_basictypeconv.cpp.
TEST_CASE | ( | "Integer Get/Put in CPU Byte Order Test 02" | , |
"" | [byteorder][get][put] | ||
) |
Definition at line 257 of file test_basictypeconv.cpp.
|
static |
Definition at line 295 of file test_basictypeconv.cpp.
TEST_CASE | ( | "Integer Get/Put in explicit Byte Order Test 03" | , |
"" | [byteorder][get][put] | ||
) |
Definition at line 319 of file test_basictypeconv.cpp.
TEST_CASE | ( | "HexString from and to byte vector conversion - Test 04" | , |
"" | [hexstring] | ||
) |
Definition at line 358 of file test_basictypeconv.cpp.
TEST_CASE | ( | "Integer Type Test Test 05" | , |
"" | [integer][type] | ||
) |
Definition at line 382 of file test_basictypeconv.cpp.
|
inlinestaticconstexpr |
Definition at line 39 of file test_basictypeconv.cpp.