jaulib v1.3.6
Jau Support Library (C++, Java, ..)
Loading...
Searching...
No Matches
test_darray_01.cpp File Reference
#include <cassert>
#include <cstring>
#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 301 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 118 of file test_darray_01.cpp.

◆ SharedPayloadListDefault

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

Definition at line 122 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 168 of file test_darray_01.cpp.

◆ PayloadListDefault

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

Definition at line 172 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 51 of file test_darray_01.cpp.

◆ countGattCharacteristicSpecList01ConstRef()

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

Definition at line 61 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 70 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 80 of file test_darray_01.cpp.

◆ makeNamedSharedPayloadListDefault()

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

Definition at line 218 of file test_darray_01.cpp.

Here is the caller graph for this function:

◆ modifyCopyOfNamedSharedPayloadListDefault()

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

Definition at line 234 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 245 of file test_darray_01.cpp.

Here is the caller graph for this function:

◆ makeNamedPayloadListDefault()

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

Definition at line 261 of file test_darray_01.cpp.

Here is the caller graph for this function:

◆ makeNamedPayloadListMemMove()

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

Definition at line 277 of file test_darray_01.cpp.

Here is the caller graph for this function:

◆ 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 304 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 318 of file test_darray_01.cpp.

◆ testDArrayValueType()

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

Definition at line 327 of file test_darray_01.cpp.

Here is the caller graph for this function:

◆ returnGattSrvcChar()

static GattServiceCharacteristic returnGattSrvcChar ( int i)
static

Definition at line 558 of file test_darray_01.cpp.

Here is the caller graph for this function:

◆ testDArrayGattServiceCharacteristic()

static void testDArrayGattServiceCharacteristic ( )
static

Definition at line 562 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 587 of file test_darray_01.cpp.