Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Classes | Macros | Typedefs | Functions
test_darray_01.cpp File Reference
#include <cassert>
#include <cinttypes>
#include <cstring>
#include <random>
#include <vector>
#include <jau/test/catch2_ext.hpp>
#include "test_datatype01.hpp"
#include "test_datatype02.hpp"
#include <jau/basic_algos.hpp>
#include <jau/basic_types.hpp>
#include <jau/darray.hpp>
#include <jau/counting_allocator.hpp>
#include <jau/callocator.hpp>
#include <jau/counting_callocator.hpp>
Include dependency graph for test_darray_01.cpp:

Go to the source code of this file.

Classes

struct  NamedPayloadListDefault< Payload >
 
struct  NamedPayloadListMemMove< Payload >
 
struct  NamedSharedPayloadListDefault< Payload >
 
struct  NamedSharedPayloadListMemMove< Payload >
 

Macros

#define CHECK_TRAITS   0
 

Typedefs

template<class Payload >
using PayloadListDefault = jau::darray< Payload >
 
template<class Payload >
using PayloadListMemMove = jau::darray< Payload, jau::nsize_t, jau::callocator< Payload >, true >
 
template<class Payload >
using SharedPayloadListDefault = jau::darray< std::shared_ptr< Payload > >
 
template<class Payload >
using SharedPayloadListMemMove = jau::darray< std::shared_ptr< Payload >, jau::nsize_t, jau::callocator< std::shared_ptr< Payload > >, true >
 

Functions

static int countGattCharacteristicSpecList01ConstRef (const jau::darray< const GattCharacteristicSpec > &clist)
 
static int countGattCharacteristicSpecList02Copy (jau::darray< const GattCharacteristicSpec > clist)
 
template<class Payload >
static NamedPayloadListDefault< Payload > makeNamedPayloadListDefault (int name)
 
template<class Payload >
static NamedPayloadListMemMove< Payload > makeNamedPayloadListMemMove (int name)
 
template<class Payload >
static NamedSharedPayloadListDefault< Payload > makeNamedSharedPayloadListDefault (int name)
 
template<class Payload >
static NamedSharedPayloadListMemMove< Payload > makeNamedSharedPayloadListMemMove (int name)
 
template<class Payload >
static NamedSharedPayloadListDefault< Payload > modifyCopyOfNamedSharedPayloadListDefault (NamedSharedPayloadListDefault< Payload > src)
 
template<class Cont >
static void print_container_info (const std::string &type_id, const Cont &c, std::enable_if_t< !jau::is_darray_type< Cont >::value, bool >=true)
 
template<class Cont >
static void print_container_info (const std::string &type_id, const Cont &c, std::enable_if_t< jau::is_darray_type< Cont >::value, bool >=true)
 
static GattServiceCharacteristic returnGattSrvcChar (int i)
 
 TEST_CASE ("JAU DArray Test 01 - jau::darray initializer list", "[datatype][jau][darray]")
 
 TEST_CASE ("JAU DArray Test 02 - jau::darray immutable type (const)", "[const][jau][darray]")
 
 TEST_CASE ("JAU DArray Test 10 - jau::darray value_type behavior (type traits)", "[datatype][jau][darray]")
 
static void testDArrayGattServiceCharacteristic ()
 
template<class Payload >
static void testDArrayValueType (const std::string &type_id)
 

Macro Definition Documentation

◆ CHECK_TRAITS

#define CHECK_TRAITS   0

Definition at line 294 of file test_darray_01.cpp.

Typedef Documentation

◆ SharedPayloadListMemMove

template<class Payload >
using SharedPayloadListMemMove = jau::darray<std::shared_ptr<Payload>, jau::nsize_t, jau::callocator<std::shared_ptr<Payload> >, true >

Definition at line 121 of file test_darray_01.cpp.

◆ SharedPayloadListDefault

template<class Payload >
using SharedPayloadListDefault = jau::darray<std::shared_ptr<Payload> >

Definition at line 125 of file test_darray_01.cpp.

◆ PayloadListMemMove

template<class Payload >
using PayloadListMemMove = jau::darray<Payload, jau::nsize_t, jau::callocator<Payload>, true >

Definition at line 171 of file test_darray_01.cpp.

◆ PayloadListDefault

template<class Payload >
using PayloadListDefault = jau::darray<Payload>

Definition at line 175 of file test_darray_01.cpp.

Function Documentation

◆ TEST_CASE() [1/3]

TEST_CASE ( "JAU DArray Test 01 - jau::darray initializer list"  ,
""  [datatype][jau][darray] 
)

Definition at line 54 of file test_darray_01.cpp.

◆ countGattCharacteristicSpecList01ConstRef()

static int countGattCharacteristicSpecList01ConstRef ( const jau::darray< const GattCharacteristicSpec > &  clist)
static

Definition at line 64 of file test_darray_01.cpp.

Here is the caller graph for this function:

◆ countGattCharacteristicSpecList02Copy()

static int countGattCharacteristicSpecList02Copy ( jau::darray< const GattCharacteristicSpec clist)
static

Definition at line 73 of file test_darray_01.cpp.

Here is the caller graph for this function:

◆ TEST_CASE() [2/3]

TEST_CASE ( "JAU DArray Test 02 - jau::darray immutable type (const)"  ,
""  [const ][jau][darray] 
)

Definition at line 83 of file test_darray_01.cpp.

◆ makeNamedSharedPayloadListDefault()

template<class Payload >
static NamedSharedPayloadListDefault< Payload > makeNamedSharedPayloadListDefault ( int  name)
static

Definition at line 221 of file test_darray_01.cpp.

◆ modifyCopyOfNamedSharedPayloadListDefault()

template<class Payload >
static NamedSharedPayloadListDefault< Payload > modifyCopyOfNamedSharedPayloadListDefault ( NamedSharedPayloadListDefault< Payload >  src)
static

Definition at line 235 of file test_darray_01.cpp.

Here is the caller graph for this function:

◆ makeNamedSharedPayloadListMemMove()

template<class Payload >
static NamedSharedPayloadListMemMove< Payload > makeNamedSharedPayloadListMemMove ( int  name)
static

Definition at line 244 of file test_darray_01.cpp.

◆ makeNamedPayloadListDefault()

template<class Payload >
static NamedPayloadListDefault< Payload > makeNamedPayloadListDefault ( int  name)
static

Definition at line 258 of file test_darray_01.cpp.

◆ makeNamedPayloadListMemMove()

template<class Payload >
static NamedPayloadListMemMove< Payload > makeNamedPayloadListMemMove ( int  name)
static

Definition at line 272 of file test_darray_01.cpp.

◆ print_container_info() [1/2]

template<class Cont >
static void print_container_info ( const std::string &  type_id,
const Cont &  c,
std::enable_if_t< jau::is_darray_type< Cont >::value, bool >  = true 
)
static

Definition at line 297 of file test_darray_01.cpp.

Here is the caller graph for this function:

◆ print_container_info() [2/2]

template<class Cont >
static void print_container_info ( const std::string &  type_id,
const Cont &  c,
std::enable_if_t< !jau::is_darray_type< Cont >::value, bool >  = true 
)
static

Definition at line 311 of file test_darray_01.cpp.

◆ testDArrayValueType()

template<class Payload >
static void testDArrayValueType ( const std::string &  type_id)
static

Definition at line 320 of file test_darray_01.cpp.

◆ returnGattSrvcChar()

static GattServiceCharacteristic returnGattSrvcChar ( int  i)
static

Definition at line 449 of file test_darray_01.cpp.

Here is the caller graph for this function:

◆ testDArrayGattServiceCharacteristic()

static void testDArrayGattServiceCharacteristic ( )
static

Definition at line 453 of file test_darray_01.cpp.

Here is the caller graph for this function:

◆ TEST_CASE() [3/3]

TEST_CASE ( "JAU DArray Test 10 - jau::darray value_type behavior (type traits)"  ,
""  [datatype][jau][darray] 
)

Definition at line 478 of file test_darray_01.cpp.