#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <amxc/amxc_variant_type.h>
#include <amxc_variant_priv.h>
#include "test_amxc_variant_type.h"
#include <amxc/amxc_macros.h>
Go to the source code of this file.
◆ test_amxc_var_add_type()
void test_amxc_var_add_type |
( |
UNUSED void ** |
state | ) |
|
Definition at line 108 of file test_amxc_variant_type.c.
amxc_array_t PRIVATE * amxc_variant_get_types_array(void)
uint32_t PRIVATE amxc_var_add_type(amxc_var_type_t *const type, const uint32_t index)
int PRIVATE amxc_var_remove_type(amxc_var_type_t *const type)
amxc_array_it_t * amxc_array_get_at(const amxc_array_t *const array, const unsigned int index)
Gets the item iterator for the given index.
#define AMXC_VAR_ID_CUSTOM_BASE
Base variant id for custom variants.
#define AMXC_VAR_ID_MAX
Same as AMXC_VAR_ID_INVALID.
static amxc_var_type_t dummy1
static amxc_var_type_t dummy3
static amxc_var_type_t dummy4
static amxc_var_type_t dummy2
◆ test_amxc_var_get_type()
void test_amxc_var_get_type |
( |
UNUSED void ** |
state | ) |
|
Definition at line 160 of file test_amxc_variant_type.c.
amxc_var_type_t * amxc_var_get_type(unsigned int type_id)
Get the type definition structure.
◆ test_amxc_var_get_type_id_from_name()
void test_amxc_var_get_type_id_from_name |
( |
UNUSED void ** |
state | ) |
|
Definition at line 221 of file test_amxc_variant_type.c.
uint32_t amxc_var_get_type_id_from_name(const char *const name)
Get the type id.
◆ test_amxc_var_get_type_name_from_id()
void test_amxc_var_get_type_name_from_id |
( |
UNUSED void ** |
state | ) |
|
Definition at line 207 of file test_amxc_variant_type.c.
const char * amxc_var_get_type_name_from_id(const uint32_t type_id)
Get the type name.
◆ test_amxc_var_register_type()
void test_amxc_var_register_type |
( |
UNUSED void ** |
state | ) |
|
Definition at line 172 of file test_amxc_variant_type.c.
uint32_t amxc_var_register_type(amxc_var_type_t *const type)
Register a new variant type.
◆ test_amxc_var_remove_type()
void test_amxc_var_remove_type |
( |
UNUSED void ** |
state | ) |
|
Definition at line 138 of file test_amxc_variant_type.c.
size_t amxc_array_size(const amxc_array_t *const array)
Calculates the number of used items in the array.
AMXC_INLINE void * amxc_array_get_data_at(const amxc_array_t *const array, const unsigned int index)
Gets the data pointer of the item at the given index.
◆ test_amxc_var_unregister_type()
void test_amxc_var_unregister_type |
( |
UNUSED void ** |
state | ) |
|
Definition at line 189 of file test_amxc_variant_type.c.
int amxc_var_unregister_type(amxc_var_type_t *const type)
Unregisters an already registered variant type.
◆ dummy1
Initial value:=
{
.copy = NULL,
.convert_from = NULL,
.convert_to = NULL,
.compare = NULL,
.del = NULL,
.name = "dummy1_t"
}
Definition at line 68 of file test_amxc_variant_type.c.
◆ dummy2
Initial value:=
{
.copy = NULL,
.convert_from = NULL,
.convert_to = NULL,
.compare = NULL,
.del = NULL,
.name = "dummy2_t"
}
Definition at line 78 of file test_amxc_variant_type.c.
◆ dummy3
Initial value:=
{
.copy = NULL,
.convert_from = NULL,
.convert_to = NULL,
.compare = NULL,
.del = NULL,
.name = "dummy3_t"
}
Definition at line 88 of file test_amxc_variant_type.c.
◆ dummy4
Initial value:=
{
.copy = NULL,
.convert_from = NULL,
.convert_to = NULL,
.compare = NULL,
.del = NULL,
.name = "dummy4_t"
}
Definition at line 98 of file test_amxc_variant_type.c.