libamxd  6.4.1
Data Model Manager
test_amxd_object.c
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** SPDX-License-Identifier: BSD-2-Clause-Patent
4 **
5 ** SPDX-FileCopyrightText: Copyright (c) 2023 SoftAtHome
6 **
7 ** Redistribution and use in source and binary forms, with or without modification,
8 ** are permitted provided that the following conditions are met:
9 **
10 ** 1. Redistributions of source code must retain the above copyright notice,
11 ** this list of conditions and the following disclaimer.
12 **
13 ** 2. Redistributions in binary form must reproduce the above copyright notice,
14 ** this list of conditions and the following disclaimer in the documentation
15 ** and/or other materials provided with the distribution.
16 **
17 ** Subject to the terms and conditions of this license, each copyright holder
18 ** and contributor hereby grants to those receiving rights under this license
19 ** a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
20 ** (except for failure to satisfy the conditions of this license) patent license
21 ** to make, have made, use, offer to sell, sell, import, and otherwise transfer
22 ** this software, where such license applies only to those patent claims, already
23 ** acquired or hereafter acquired, licensable by such copyright holder or contributor
24 ** that are necessarily infringed by:
25 **
26 ** (a) their Contribution(s) (the licensed copyrights of copyright holders and
27 ** non-copyrightable additions of contributors, in source or binary form) alone;
28 ** or
29 **
30 ** (b) combination of their Contribution(s) with the work of authorship to which
31 ** such Contribution(s) was added by such copyright holder or contributor, if,
32 ** at the time the Contribution is added, such addition causes such combination
33 ** to be necessarily infringed. The patent license shall not apply to any other
34 ** combinations which include the Contribution.
35 **
36 ** Except as expressly stated above, no rights or licenses from any copyright
37 ** holder or contributor is granted under this license, whether expressly, by
38 ** implication, estoppel or otherwise.
39 **
40 ** DISCLAIMER
41 **
42 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
43 ** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
44 ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
45 ** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
46 ** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
47 ** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
48 ** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
49 ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
50 ** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
51 ** USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
52 **
53 ****************************************************************************/
54 
55 #include <stdlib.h>
56 #include <stdarg.h>
57 #include <stddef.h>
58 #include <setjmp.h>
59 #include <fcntl.h>
60 #include <unistd.h>
61 #include <signal.h>
62 #include <cmocka.h>
63 
64 #include <amxc/amxc.h>
65 #include <amxp/amxp_signal.h>
66 #include <amxp/amxp_slot.h>
67 
68 #include <amxd/amxd_common.h>
69 #include <amxd/amxd_dm.h>
70 #include <amxd/amxd_object.h>
71 
72 #include "test_amxd_object.h"
73 
74 #include <amxc/amxc_macros.h>
75 static amxd_dm_t dm;
76 
77 void test_amxd_object_new_singleton(UNUSED void** state) {
78  amxd_object_t* object = NULL;
79 
80  assert_int_equal(amxd_object_new(&object, amxd_object_singleton, "test_object"), 0);
81  assert_ptr_not_equal(object, NULL);
82  assert_string_equal(object->name, "test_object");
83  assert_int_equal(object->type, amxd_object_singleton);
84  assert_false(object->attr.read_only);
85  assert_false(object->attr.priv);
86  assert_false(object->attr.persistent);
87  assert_false(object->attr.locked);
88  assert_int_equal(object->index, 0);
89  assert_true(amxc_llist_is_empty(&object->objects));
90  assert_true(amxc_llist_is_empty(&object->instances));
91  assert_int_equal(amxc_llist_size(&object->functions), 0);
92  assert_true(amxc_llist_is_empty(&object->derived_objects));
93  assert_ptr_not_equal(object->derived_from.llist, NULL);
94  assert_ptr_equal(object->it.llist, NULL);
95  amxd_object_delete(&object);
96  assert_ptr_equal(object, NULL);
97 
98  assert_int_equal(amxd_object_new(&object, amxd_object_singleton, "_test-object2"), 0);
99  assert_ptr_not_equal(object, NULL);
100  amxd_object_delete(&object);
101  assert_ptr_equal(object, NULL);
102 }
103 
104 void test_amxd_object_new_template(UNUSED void** state) {
105  amxd_object_t* object = NULL;
106 
107  assert_int_equal(amxd_object_new(&object, amxd_object_template, "test_object"), 0);
108  assert_ptr_not_equal(object, NULL);
109  assert_string_equal(object->name, "test_object");
110  assert_int_equal(object->type, amxd_object_template);
111  assert_false(object->attr.read_only);
112  assert_false(object->attr.priv);
113  assert_false(object->attr.persistent);
114  assert_false(object->attr.locked);
115  assert_int_equal(object->index, 0);
116  assert_true(amxc_llist_is_empty(&object->objects));
117  assert_true(amxc_llist_is_empty(&object->instances));
118  assert_int_equal(amxc_llist_size(&object->functions), 0);
119  assert_true(amxc_llist_is_empty(&object->derived_objects));
120  assert_ptr_not_equal(object->derived_from.llist, NULL);
121  assert_ptr_equal(object->it.llist, NULL);
122  amxd_object_delete(&object);
123  assert_ptr_equal(object, NULL);
124 
125  assert_int_equal(amxd_object_new(&object, amxd_object_template, "_test-object2"), 0);
126  assert_ptr_not_equal(object, NULL);
127  amxd_object_delete(&object);
128  assert_ptr_equal(object, NULL);
129 }
130 
131 void test_amxd_object_new_mib(UNUSED void** state) {
132  amxd_object_t* object = NULL;
133 
134  assert_int_equal(amxd_object_new(&object, amxd_object_mib, "test-object"), 0);
135  assert_ptr_not_equal(object, NULL);
136  assert_string_equal(object->name, "test-object");
137  assert_int_equal(object->type, amxd_object_mib);
138  assert_false(object->attr.read_only);
139  assert_false(object->attr.priv);
140  assert_false(object->attr.persistent);
141  assert_false(object->attr.locked);
142  assert_int_equal(object->index, 0);
143  assert_true(amxc_llist_is_empty(&object->objects));
144  assert_true(amxc_llist_is_empty(&object->instances));
145  assert_true(amxc_llist_is_empty(&object->functions));
146  assert_true(amxc_llist_is_empty(&object->derived_objects));
147  assert_ptr_equal(object->derived_from.llist, NULL);
148  assert_ptr_equal(object->it.llist, NULL);
149  amxd_object_delete(&object);
150  assert_ptr_equal(object, NULL);
151 }
152 
153 void test_amxd_object_new_invalid_type(UNUSED void** state) {
154  amxd_object_t* object = NULL;
155  assert_int_not_equal(amxd_object_new(&object, amxd_object_root, "test_object"), 0);
156  assert_ptr_equal(object, NULL);
157  assert_int_not_equal(amxd_object_new(&object, amxd_object_instance, "test_object"), 0);
158  assert_ptr_equal(object, NULL);
159  assert_int_not_equal(amxd_object_new(&object, amxd_object_invalid, "test_object"), 0);
160  assert_ptr_equal(object, NULL);
161 }
162 
163 void test_amxd_object_new_invalid_name(UNUSED void** state) {
164  amxd_object_t* object = NULL;
165  assert_int_not_equal(amxd_object_new(&object, amxd_object_template, "1_test_object"), 0);
166  assert_ptr_equal(object, NULL);
167  assert_int_not_equal(amxd_object_new(&object, amxd_object_template, "test&object"), 0);
168  assert_ptr_equal(object, NULL);
169  assert_int_not_equal(amxd_object_new(&object, amxd_object_template, "-test_object"), 0);
170  assert_ptr_equal(object, NULL);
171  assert_int_not_equal(amxd_object_new(&object, amxd_object_template, ""), 0);
172  assert_ptr_equal(object, NULL);
173  assert_int_not_equal(amxd_object_new(&object, amxd_object_template, NULL), 0);
174  assert_ptr_equal(object, NULL);
175 }
176 
177 void test_amxd_object_new_instance(UNUSED void** state) {
178  amxd_object_t* template = NULL;
179  amxd_object_t* object = NULL;
180  assert_int_equal(amxd_object_new(&template, amxd_object_template, "test_object"), 0);
181  assert_ptr_not_equal(template, NULL);
182 
183  assert_int_equal(amxd_object_new_instance(&object, template, "test_instance1", 0, NULL), 0);
184  assert_ptr_not_equal(object, NULL);
185  assert_string_equal(object->name, "test_instance1");
186  assert_int_equal(object->type, amxd_object_instance);
187  assert_false(object->attr.read_only);
188  assert_false(object->attr.priv);
189  assert_false(object->attr.persistent);
190  assert_false(object->attr.locked);
191  assert_int_equal(object->index, 1);
192  assert_true(amxc_llist_is_empty(&object->objects));
193  assert_true(amxc_llist_is_empty(&object->instances));
194  assert_true(amxc_llist_is_empty(&object->functions));
195  assert_true(amxc_llist_is_empty(&object->derived_objects));
196  assert_ptr_equal(object->derived_from.llist, NULL);
197  assert_ptr_equal(object->it.llist, &template->instances);
198  amxd_object_delete(&template);
199 
200  amxd_object_delete(&template);
201 }
202 
204  amxd_object_t* template = NULL;
205  amxd_object_t* object = NULL;
206  assert_int_equal(amxd_object_new(&template, amxd_object_template, "test_object"), 0);
207  assert_ptr_not_equal(template, NULL);
208 
209  assert_int_equal(amxd_object_new_instance(&object, template, "test-instance1", 0, NULL), 0);
210  assert_int_equal(object->index, 1);
211  assert_int_not_equal(amxd_object_new_instance(&object, template, "test-instance2", 1, NULL), 0);
212  assert_int_not_equal(amxd_object_new_instance(&object, template, "test-instance1", 0, NULL), 0);
213  assert_int_equal(amxd_object_new_instance(&object, template, NULL, 0, NULL), 0);
214  assert_int_equal(object->index, 2);
215  assert_int_equal(amxd_object_new_instance(&object, template, NULL, 5, NULL), 0);
216  assert_int_equal(object->index, 5);
217  assert_int_equal(amxd_object_new_instance(&object, template, "", 0, NULL), 0);
218  assert_int_equal(object->index, 6);
219 
220  assert_int_not_equal(amxd_object_new_instance(&object, template, "1", 0, NULL), 0);
221  assert_ptr_equal(object, NULL);
222  assert_int_not_equal(amxd_object_new_instance(&object, template, "Test#Instance", 0, NULL), 0);
223  assert_ptr_equal(object, NULL);
224  assert_int_not_equal(amxd_object_new_instance(&object, template, "Test.Instance", 0, NULL), 0);
225  assert_ptr_equal(object, NULL);
226  assert_int_not_equal(amxd_object_new_instance(&object, template, "Test/Instance", 0, NULL), 0);
227  assert_ptr_equal(object, NULL);
228  assert_int_not_equal(amxd_object_new_instance(&object, template, "1Q", 0, NULL), 0);
229  assert_ptr_equal(object, NULL);
230 
231  amxd_object_delete(&template);
232 }
233 
235  amxd_object_t* singelton = NULL;
236  amxd_object_t* object = NULL;
237  assert_int_equal(amxd_object_new(&singelton, amxd_object_singleton, "test_object"), 0);
238  assert_ptr_not_equal(singelton, NULL);
239 
240  assert_int_not_equal(amxd_object_new_instance(&object, singelton, "instance1", 0, NULL), 0);
241  assert_ptr_equal(object, NULL);
242 
243  amxd_object_delete(&singelton);
244 }
245 
247  amxd_object_t* template = NULL;
248  amxd_object_t* child_object = NULL;
249  amxd_object_t* object = NULL;
250 
251  assert_int_equal(amxd_dm_init(&dm), 0);
252 
253  assert_int_equal(amxd_object_new(&template, amxd_object_template, "test_object"), 0);
254  assert_ptr_not_equal(template, NULL);
255  assert_int_equal(amxd_dm_add_root_object(&dm, template), 0);
256 
257  assert_int_equal(amxd_object_new(&object, amxd_object_singleton, "sub-object-1"), 0);
258  assert_ptr_not_equal(object, NULL);
259  assert_int_equal(amxd_object_add_object(template, object), 0);
260  assert_int_equal(amxd_object_new(&child_object, amxd_object_singleton, "sub-object-2"), 0);
261  assert_ptr_not_equal(object, NULL);
262  assert_int_equal(amxd_object_add_object(template, child_object), 0);
263  assert_int_equal(amxd_object_new(&object, amxd_object_singleton, "sub-object-3"), 0);
264  assert_ptr_not_equal(object, NULL);
265  assert_int_equal(amxd_object_add_object(template, object), 0);
266  assert_int_equal(amxc_llist_size(&template->objects), 3);
267 
268  assert_int_equal(amxd_object_new_instance(&object, template, "instance-1", 0, NULL), 0);
269  assert_ptr_not_equal(object, NULL);
270  assert_int_equal(amxc_llist_size(&object->objects), 3);
271  assert_int_equal(amxc_llist_size(&child_object->derived_objects), 1);
272 
273  amxd_object_delete(&child_object);
274 
275  amxd_dm_clean(&dm);
276 }
277 
278 void test_amxd_object_new_delete_invalid_args(UNUSED void** state) {
279  amxd_object_t* template = NULL;
280  amxd_object_t* object = NULL;
281  assert_int_equal(amxd_object_new(&template, amxd_object_template, "test_object"), 0);
282  assert_ptr_not_equal(template, NULL);
283 
284  assert_int_not_equal(amxd_object_new_instance(&object, NULL, "instance1", 0, NULL), 0);
285  assert_ptr_equal(object, NULL);
286  assert_int_not_equal(amxd_object_new_instance(NULL, template, "instance1", 0, NULL), 0);
287 
288  amxd_object_delete(&template);
289  amxd_object_delete(&template);
290  amxd_object_delete(NULL);
291 
292  assert_int_not_equal(amxd_object_new(NULL, amxd_object_template, "test_object"), 0);
293 }
294 
295 void test_amxd_object_get_name(UNUSED void** state) {
296  amxd_object_t* parent = NULL;
297  amxd_object_t* child1 = NULL;
298  amxd_object_t* child2 = NULL;
299  amxd_object_t* instance_child2 = NULL;
300  amxd_object_t* instance = NULL;
301 
302  assert_int_equal(amxd_dm_init(&dm), 0);
303 
304  assert_int_equal(amxd_object_new(&parent, amxd_object_singleton, "parent"), 0);
305  assert_int_equal(amxd_object_new(&child1, amxd_object_template, "child"), 0);
306  assert_int_equal(amxd_object_new(&child2, amxd_object_template, "sub-child"), 0);
307  assert_int_equal(amxd_dm_add_root_object(&dm, parent), 0);
308  assert_int_equal(amxd_object_add_object(parent, child1), 0);
309  assert_int_equal(amxd_object_add_object(child1, child2), 0);
310  assert_int_equal(amxd_object_new_instance(&instance, child1, "sub-child", 0, NULL), 0);
311 
312  assert_string_equal(amxd_object_get_name(parent, AMXD_OBJECT_NAMED), "parent");
313  assert_string_equal(amxd_object_get_name(child1, AMXD_OBJECT_NAMED), "child");
314  assert_string_equal(amxd_object_get_name(child2, AMXD_OBJECT_NAMED), "sub-child");
315  assert_string_equal(amxd_object_get_name(instance, AMXD_OBJECT_NAMED), "sub-child");
316  assert_string_equal(amxd_object_get_name(instance, AMXD_OBJECT_INDEXED), "1");
317  assert_ptr_equal(amxd_object_get_name(amxd_dm_get_root(&dm), AMXD_OBJECT_NAMED), NULL);
318 
319  instance_child2 = amxd_object_findf(instance, "sub-child");
320  assert_ptr_not_equal(instance_child2, NULL);
321  assert_ptr_not_equal(instance_child2, child2);
322  assert_string_equal(amxd_object_get_name(instance_child2, AMXD_OBJECT_NAMED), "sub-child");
323 
324  assert_ptr_equal(amxd_object_get_name(NULL, 0), NULL);
325 
326  amxd_dm_clean(&dm);
327 }
328 
330  amxd_object_t* parent = NULL;
331  amxd_object_t* instance = NULL;
332 
333  assert_int_equal(amxd_dm_init(&dm), 0);
334  assert_int_equal(amxd_object_new(&parent, amxd_object_template, "parent"), 0);
335  assert_int_equal(amxd_dm_add_root_object(&dm, parent), 0);
336  assert_int_equal(amxd_object_new_instance(&instance, parent, NULL, 5, NULL), 0);
337 
338  assert_string_equal(amxd_object_get_name(instance, AMXD_OBJECT_NAMED), "5");
339 
340  amxd_dm_clean(&dm);
341 }
342 
343 void test_amxd_object_attributes(UNUSED void** state) {
344  amxd_object_t* object = NULL;
345 
346  assert_int_equal(amxd_object_new(&object, amxd_object_template, "test_object"), 0);
347  assert_false(amxd_object_is_attr_set(object, amxd_oattr_read_only));
348  assert_false(amxd_object_is_attr_set(object, amxd_oattr_persistent));
349  assert_false(amxd_object_is_attr_set(object, amxd_oattr_private));
350  assert_false(amxd_object_is_attr_set(object, amxd_oattr_locked));
351  assert_false(amxd_object_is_attr_set(object, 999));
352 
353  assert_int_equal(amxd_object_set_attr(object, amxd_oattr_read_only, true), 0);
354  assert_true(amxd_object_is_attr_set(object, amxd_oattr_read_only));
355  assert_int_equal(amxd_object_set_attr(object, amxd_oattr_read_only, false), 0);
356  assert_false(amxd_object_is_attr_set(object, amxd_oattr_read_only));
357 
358  assert_int_equal(amxd_object_set_attr(object, amxd_oattr_persistent, true), 0);
359  assert_true(amxd_object_is_attr_set(object, amxd_oattr_persistent));
360  assert_int_equal(amxd_object_set_attr(object, amxd_oattr_persistent, false), 0);
361  assert_false(amxd_object_is_attr_set(object, amxd_oattr_persistent));
362 
363  assert_int_equal(amxd_object_set_attr(object, amxd_oattr_private, true), 0);
364  assert_true(amxd_object_is_attr_set(object, amxd_oattr_private));
365  assert_int_equal(amxd_object_set_attr(object, amxd_oattr_private, false), 0);
366  assert_false(amxd_object_is_attr_set(object, amxd_oattr_private));
367 
368  assert_int_not_equal(amxd_object_set_attr(object, 999, false), 0);
369  assert_false(amxd_object_is_attr_set(object, 999));
370 
371  assert_int_equal(amxd_object_set_attrs(object,
375  true), 0);
376  assert_true(amxd_object_is_attr_set(object, amxd_oattr_read_only));
377  assert_true(amxd_object_is_attr_set(object, amxd_oattr_persistent));
378  assert_true(amxd_object_is_attr_set(object, amxd_oattr_private));
379 
380  assert_int_equal(amxd_object_set_attrs(object,
384  false), 0);
385  assert_false(amxd_object_is_attr_set(object, amxd_oattr_read_only));
386  assert_false(amxd_object_is_attr_set(object, amxd_oattr_persistent));
387  assert_false(amxd_object_is_attr_set(object, amxd_oattr_private));
388 
389  assert_int_equal(amxd_object_set_attr(object, amxd_oattr_locked, true), 0);
390  assert_true(amxd_object_is_attr_set(object, amxd_oattr_locked));
391  assert_int_not_equal(amxd_object_set_attr(object, amxd_oattr_locked, false), 0);
392  assert_true(amxd_object_is_attr_set(object, amxd_oattr_locked));
393 
394  assert_int_not_equal(amxd_object_set_attrs(object,
397  SET_BIT((amxd_oattr_max + 1)),
398  true), 0);
399 
400  amxd_object_delete(&object);
401 
402  assert_int_not_equal(amxd_object_set_attrs(NULL,
406  false), 0);
407 
408  assert_false(amxd_object_is_attr_set(NULL, amxd_oattr_locked));
410 }
#define SET_BIT(x)
Definition: amxd_common.h:65
Ambiorix Data Model API header file.
Ambiorix Data Model API header file.
#define AMXD_OBJECT_INDEXED
Name and path format flag - use index for instance objects.
Definition: amxd_object.h:176
#define AMXD_OBJECT_NAMED
Name and path format flag - default behavior, use name for instance objects.
Definition: amxd_object.h:164
@ amxd_oattr_read_only
Definition: amxd_types.h:199
@ amxd_oattr_locked
Definition: amxd_types.h:206
@ amxd_oattr_max
Definition: amxd_types.h:211
@ amxd_oattr_persistent
Definition: amxd_types.h:200
@ amxd_oattr_private
Definition: amxd_types.h:202
@ amxd_object_root
Definition: amxd_types.h:178
@ amxd_object_template
Definition: amxd_types.h:183
@ amxd_object_mib
Definition: amxd_types.h:188
@ amxd_object_singleton
Definition: amxd_types.h:181
@ amxd_object_instance
Definition: amxd_types.h:186
@ amxd_object_invalid
Definition: amxd_types.h:190
amxd_object_t * amxd_dm_get_root(amxd_dm_t *const dm)
Fetches the root object of the data model.
Definition: amxd_dm.c:456
amxd_status_t amxd_dm_add_root_object(amxd_dm_t *const dm, amxd_object_t *const object)
Adds an object to the root of the data model.
Definition: amxd_dm.c:418
amxd_status_t amxd_dm_init(amxd_dm_t *dm)
Initializes a data model structure.
Definition: amxd_dm.c:334
void amxd_dm_clean(amxd_dm_t *dm)
Cleans a data model structure.
Definition: amxd_dm.c:365
amxd_object_t * amxd_object_findf(amxd_object_t *object, const char *rel_path,...) __attribute__((format(printf
Find an object in the data model tree, starting from an object.
amxd_status_t amxd_object_add_object(amxd_object_t *const parent, amxd_object_t *const child)
Adds an object in the data model tree.
Definition: amxd_object.c:207
amxd_status_t amxd_object_set_attr(amxd_object_t *const object, const amxd_oattr_id_t attr, const bool enable)
Sets or unsets an object attribute.
Definition: amxd_object.c:269
amxd_status_t amxd_object_new_instance(amxd_object_t **object, amxd_object_t *templ, const char *name, uint32_t index, amxc_var_t *values)
Data model object constructor function.
amxd_status_t amxd_object_new(amxd_object_t **object, const amxd_object_type_t type, const char *name)
Data model object constructor function.
Definition: amxd_object.c:185
void amxd_object_delete(amxd_object_t **object)
Invokes the destroy handler(s) of the object.
bool amxd_object_is_attr_set(const amxd_object_t *const object, const amxd_oattr_id_t attr)
Checks if an attribute is set.
Definition: amxd_object.c:348
const char * amxd_object_get_name(const amxd_object_t *const object, const uint32_t flags)
Get the name of the object (or index as a string for instance objects)
Definition: amxd_object.c:239
amxd_status_t amxd_object_set_attrs(amxd_object_t *const object, const uint32_t bitmask, bool enable)
Sets or unsets object attributes using a bitmap.
Definition: amxd_object.c:301
uint32_t read_only
Definition: amxd_types.h:221
uint32_t persistent
Definition: amxd_types.h:223
amxc_llist_t derived_objects
Definition: amxd_types.h:248
amxc_llist_it_t derived_from
Definition: amxd_types.h:249
amxd_object_type_t type
Definition: amxd_types.h:236
amxd_object_attr_t attr
Definition: amxd_types.h:237
amxc_llist_t functions
Definition: amxd_types.h:245
uint32_t index
Definition: amxd_types.h:240
amxc_llist_t objects
Definition: amxd_types.h:243
char * name
Definition: amxd_types.h:238
amxc_llist_it_t it
Definition: amxd_types.h:230
amxc_llist_t instances
Definition: amxd_types.h:244
void test_amxd_object_get_name(UNUSED void **state)
static amxd_dm_t dm
void test_amxd_object_new_instance_invalid_name_index(UNUSED void **state)
void test_amxd_object_new_invalid_type(UNUSED void **state)
void test_amxd_object_get_name_of_indexed_instance(UNUSED void **state)
void test_amxd_object_new_delete_invalid_args(UNUSED void **state)
void test_amxd_object_attributes(UNUSED void **state)
void test_amxd_object_new_invalid_name(UNUSED void **state)
void test_amxd_object_new_mib(UNUSED void **state)
void test_amxd_object_new_instance_of_singelton(UNUSED void **state)
void test_amxd_object_new_instance_with_children(UNUSED void **state)
void test_amxd_object_new_template(UNUSED void **state)
void test_amxd_object_new_instance(UNUSED void **state)
void test_amxd_object_new_singleton(UNUSED void **state)