libamxo  4.3.4
Object Definition Language (ODL) parsing
test_issue_48.c File Reference
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <inttypes.h>
#include <limits.h>
#include <unistd.h>
#include <fcntl.h>
#include <cmocka.h>
#include <amxc/amxc.h>
#include <amxp/amxp.h>
#include <amxp/amxp_signal.h>
#include <amxd/amxd_dm.h>
#include <amxd/amxd_object.h>
#include <amxd/amxd_object_expression.h>
#include <amxd/amxd_parameter.h>
#include <amxo/amxo.h>
#include <amxo/amxo_mibs.h>
#include "amxo_version.h"
#include "test_issue_48.h"

Go to the source code of this file.

Macros

#define UNUSED   __attribute__((unused))
 

Functions

void test_lib_version (__attribute__((unused)) void **state)
 
void test_populate_object_resolves_path (__attribute__((unused)) void **state)
 

Macro Definition Documentation

◆ UNUSED

#define UNUSED   __attribute__((unused))

Definition at line 84 of file test_issue_48.c.

Function Documentation

◆ test_lib_version()

void test_lib_version ( __attribute__((unused)) void **  state)

Definition at line 86 of file test_issue_48.c.

86  {
87  assert_string_equal(amxo_lib_version(), AMXO_VERSION);
88 }
const char * amxo_lib_version(void)
Returns the version of lib amxo.
Definition: amxo_version.c:58

◆ test_populate_object_resolves_path()

void test_populate_object_resolves_path ( __attribute__((unused)) void **  state)

Definition at line 90 of file test_issue_48.c.

90  {
91  amxd_dm_t dm;
92  amxo_parser_t parser;
93 
94  amxd_dm_init(&dm);
95  amxo_parser_init(&parser);
96 
97  assert_int_equal(amxo_parser_parse_file(&parser, "./issue_48.odl", amxd_dm_get_root(&dm)), 0);
98 
99  amxo_parser_clean(&parser);
100  amxd_dm_clean(&dm);
101 }
void amxo_parser_clean(amxo_parser_t *parser)
Cleans up the odl parser instance.
int amxo_parser_parse_file(amxo_parser_t *parser, const char *file_path, amxd_object_t *object)
Parses an odl file.
int amxo_parser_init(amxo_parser_t *parser)
Initializes a new odl parser instance.
The ODL parser structure.
Definition: amxo_types.h:245