#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <memory>
#include <jau/basic_types.hpp>
#include <jau/bitfield.hpp>
#include <jau/bitheap.hpp>
#include <jau/debug.hpp>
#include <jau/int_types.hpp>
#include <jau/io/bit_stream.hpp>
#include <jau/io/byte_stream.hpp>
#include <jau/io/file_util.hpp>
#include <jau/io/io_util.hpp>
#include <jau/string_util.hpp>
#include <jau/test/catch2_ext.hpp>
#include "data_bitstream.hpp"
#include <unistd.h>
Go to the source code of this file.
|
| typedef uint_bytes_t< sizeof(unsigned long int)> | nsize_t |
| | Natural 'size_t' alternative using uint<XX>_t with xx = sizeof(unsigned long int)*8 as its natural sized type, i.e.
|
| |
|
| static jau::bitheap | getBitfield (const jau::nsize_t bitCount, const jau::bit_order_t bitOrder) |
| |
| static jau::io::Bitstream | getTestStream (const jau::bit_order_t dataBitOrder, const nsize_t preBits, const nsize_t skipBits, const nsize_t postBits) |
| |
| static std::string | getTestStreamResultAsString (const jau::bit_order_t dataBitOrder, const jau::nsize_t preBits, const jau::nsize_t skipBits, const jau::nsize_t postBits) |
| |
| static std::string | readBits (jau::io::Bitstream *copy, jau::io::Bitstream &input, const nsize_t preCount, const nsize_t count) |
| |
| | TEST_CASE ("Bitstream Test 00", "[bitstream]") |
| |
| | TEST_CASE ("Bitstream Test 01 LinearBitsMSBFirst", "[bitstream]") |
| |
| | TEST_CASE ("Bitstream Test 02 LinearBitsLSBFirst", "[bitstream]") |
| |
| | TEST_CASE ("Bitstream Test 11 BulkBitsLSBFirst", "[bitstream]") |
| |
| | TEST_CASE ("Bitstream Test 21 ErrorHandling", "[bitstream]") |
| |
| static void | testBulkBitsImpl (const nsize_t preBits, const nsize_t skipBits, const nsize_t postBits) |
| |
| static void | testLinearBitsImpl (const jau::bit_order_t bitOrder) |
| |
| static void | testLinearBitsImpl (const jau::bit_order_t bitOrder, const nsize_t preBits, const nsize_t skipBits, const nsize_t postBits) |
| |
◆ nsize_t
| typedef uint_bytes_t<sizeof(unsigned long int)> jau::nsize_t |
Natural 'size_t' alternative using uint<XX>_t with xx = sizeof(unsigned long int)*8 as its natural sized type, i.e.
either uint32_t (ILP32, LLP64), uint64_t (LP64, ILP64, SILP64) or uint128_t (future).
This is a compromise to indicate intend and to avoid using a multiple sized size_t footprint where not desired.
Note: size_t on LLP64 model is 64-bit, while unsigned long int and hence jau::nsize_t remains 32-bit.
- See also
- jau::cpu::pointer_bit_size()
Definition at line 85 of file int_types.hpp.
◆ TEST_CASE() [1/5]
| TEST_CASE |
( |
"Bitstream Test 00" | , |
|
|
"" | [bitstream] ) |
◆ getBitfield()
◆ getTestStream()
◆ getTestStreamResultAsString()
◆ readBits()
◆ testLinearBitsImpl() [1/2]
◆ testLinearBitsImpl() [2/2]
◆ TEST_CASE() [2/5]
| TEST_CASE |
( |
"Bitstream Test 01 LinearBitsMSBFirst" | , |
|
|
"" | [bitstream] ) |
◆ TEST_CASE() [3/5]
| TEST_CASE |
( |
"Bitstream Test 02 LinearBitsLSBFirst" | , |
|
|
"" | [bitstream] ) |
◆ testBulkBitsImpl()
◆ TEST_CASE() [4/5]
| TEST_CASE |
( |
"Bitstream Test 11 BulkBitsLSBFirst" | , |
|
|
"" | [bitstream] ) |
◆ TEST_CASE() [5/5]
| TEST_CASE |
( |
"Bitstream Test 21 ErrorHandling" | , |
|
|
"" | [bitstream] ) |