lexLeo
Loading...
Searching...
No Matches
ast_test_utils.h
1// src/core/ast/include/internal/ast_test_utils.h
2
3#ifndef AST_INTERNAL_H
4#define AST_INTERNAL_H
5
6#include "ast.h"
7
8#include "internal/ast_memory_allocator.h"
9#include "internal/ast_string_utils.h"
10
11#ifdef UNIT_TEST
12
13typedef void (*ast_destroy_typed_data_int_fn)(typed_data *typed_data_int);
14void real_ast_destroy_typed_data_int(typed_data *typed_data_int);
15extern ast_destroy_typed_data_int_fn ast_destroy_typed_data_int_mockable;
16void set_ast_destroy_typed_data_int(ast_destroy_typed_data_int_fn f);
17
18typedef void (*ast_destroy_typed_data_string_fn)(typed_data *typed_data_string);
19void real_ast_destroy_typed_data_string(typed_data *typed_data_string);
20extern ast_destroy_typed_data_string_fn ast_destroy_typed_data_string_mockable;
21void set_ast_destroy_typed_data_string(ast_destroy_typed_data_string_fn f);
22
23typedef void (*ast_destroy_typed_data_symbol_fn)(typed_data *typed_data_symbol);
24void real_ast_destroy_typed_data_symbol(typed_data *typed_data_symbol);
25extern ast_destroy_typed_data_symbol_fn ast_destroy_typed_data_symbol_mockable;
26void set_ast_destroy_typed_data_symbol(ast_destroy_typed_data_symbol_fn f);
27
28typedef void (*ast_destroy_typed_data_wrapper_fn)(ast *ast_data_wrapper);
29void real_ast_destroy_typed_data_wrapper(ast *ast_data_wrapper);
30extern ast_destroy_typed_data_wrapper_fn ast_destroy_typed_data_wrapper_mockable;
31void set_ast_destroy_typed_data_wrapper(ast_destroy_typed_data_wrapper_fn f);
32
33typedef void (*ast_destroy_children_node_fn)(ast *children_node);
34void real_ast_destroy_children_node(ast *children_node);
35extern ast_destroy_children_node_fn ast_destroy_children_node_mockable;
36void set_ast_destroy_children_node(ast_destroy_children_node_fn f);
37
38typedef ast_children_t * (*ast_create_ast_children_arr_fn)(size_t children_nb, ast **children);
39ast_children_t *real_ast_create_ast_children_arr(size_t children_nb, ast **children);
40extern ast_create_ast_children_arr_fn ast_create_ast_children_arr_mockable;
41void set_ast_create_ast_children_arr(ast_create_ast_children_arr_fn f);
42
43typedef void (*ast_destroy_ast_children_fn)(ast_children_t *ast_children);
44void real_ast_destroy_ast_children(ast_children_t *ast_children);
45extern ast_destroy_ast_children_fn ast_destroy_ast_children_mockable;
46void set_ast_destroy_ast_children(ast_destroy_ast_children_fn f);
47
48typedef void (*ast_destroy_fn)(ast *root);
49void real_ast_destroy(ast *root);
50extern ast_destroy_fn ast_destroy_mockable;
51void set_ast_destroy(ast_destroy_fn f);
52
53#endif
54
55#endif //AST_INTERNAL_H
Definition ast.h:89
Definition ast.h:113
Definition ast.h:95