libamxc  1.10.3
C Generic Data Containers
test_main.c File Reference
#include <stdlib.h>
#include <setjmp.h>
#include <stdarg.h>
#include <cmocka.h>
#include <amxc/amxc.h>
#include "amxc_variant_priv.h"
#include "test_amxc_variant_type.h"

Go to the source code of this file.

Functions

int main (void)
 

Function Documentation

◆ main()

int main ( void  )

Definition at line 64 of file test_main.c.

64  {
66  for(int i = 0; i < AMXC_VAR_ID_CUSTOM_BASE + 1; i++) {
67  amxc_array_it_t* ait = amxc_array_get_at(types, i);
69  }
70  const struct CMUnitTest tests[] = {
71  cmocka_unit_test(test_amxc_var_add_type),
72  cmocka_unit_test(test_amxc_var_remove_type),
73  cmocka_unit_test(test_amxc_var_get_type),
74  cmocka_unit_test(test_amxc_var_register_type),
75  cmocka_unit_test(test_amxc_var_unregister_type),
76  cmocka_unit_test(test_amxc_var_get_type_name_from_id),
77  cmocka_unit_test(test_amxc_var_get_type_id_from_name),
78  };
79  return cmocka_run_group_tests_name("amxc-variant-types", tests, NULL, NULL);
80 }
amxc_array_t PRIVATE * amxc_variant_get_types_array(void)
void * amxc_array_it_take_data(amxc_array_it_t *const it)
Gets and removes a data pointer from the iterator.
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.
Definition: amxc_array.c:504
#define AMXC_VAR_ID_CUSTOM_BASE
Base variant id for custom variants.
Definition: amxc_variant.h:257
The array iterator structure.
Definition: amxc_array.h:174
The array structure.
Definition: amxc_array.h:162
void test_amxc_var_remove_type(UNUSED void **state)
void test_amxc_var_get_type_id_from_name(UNUSED void **state)
void test_amxc_var_get_type(UNUSED void **state)
void test_amxc_var_register_type(UNUSED void **state)
void test_amxc_var_unregister_type(UNUSED void **state)
void test_amxc_var_get_type_name_from_id(UNUSED void **state)
void test_amxc_var_add_type(UNUSED void **state)