#include <stdio.h>
#include <ctype.h>
#include "lib/memory.h"
#include "lib/vec.h"
#include "lib/misc.h"
#include "lib/arith.h"
#include "lib/errno.h"
#include "lib/string.h"
#include "ut/ut.h"
#include "xcode/xcode.h"
#include "test_gccxml_simple.h"
#include "test_gccxml_simple_xc.h"
Go to the source code of this file.
|
#define | OBJ(xt, ptr) (&(struct m0_xcode_obj){ .xo_type = (xt), .xo_ptr = (ptr) }) |
|
#define | ARS "<(0, 0x1), (0, 0x1), (0, 0x1), (0, 0x1), (0, 0x1), (0, 0x1)>" |
|
#define | __ENUM_ONLY |
|
#define | CHECK(v) m0_streq(m0_xcode_enum_print(&m0_xc_testenum_enum, v, NULL), #v) |
|
#define | C(v) (enum_read_check(#v, strlen(#v), v, 0)) |
|
|
enum | { N = 6
} |
|
enum | { CHILDREN_MAX = 16
} |
|
enum | { FSIZE = sizeof(uint64_t) + sizeof(uint64_t)
} |
|
|
static struct tdata | __attribute__ ((packed)) |
|
static int | xcode_init (void) |
|
| __attribute__ ((unused)) |
|
static void | chk (struct m0_xcode_cursor *it, int depth, const struct m0_xcode_type *xt, void *addr, int fieldno, int elno, enum m0_xcode_cursor_flag flag) |
|
static void | xcode_cursor_test (void) |
|
static void | xcode_length_test (void) |
|
static void | xcode_encode_test (void) |
|
static void | xcode_opaque_test (void) |
|
static void | decode (struct m0_xcode_obj *obj) |
|
static void | xcode_decode_test (void) |
|
static int | foo_length (struct m0_xcode_ctx *ctx, const void *obj) |
|
static void | foo_xor (char *buf) |
|
static int | foo_encode (struct m0_xcode_ctx *ctx, const void *obj) |
|
static int | foo_decode (struct m0_xcode_ctx *ctx, void *obj) |
|
static void | xcode_nonstandard_test (void) |
|
static void | xcode_cmp_test (void) |
|
static int | custom_read (const struct m0_xcode_cursor *it, struct m0_xcode_obj *obj, const char *str) |
|
static void | literal (const char *input, const char *output) |
|
static void | xcode_read_test (void) |
|
static void | xcode_print_test (void) |
|
static void | xcode_find_test (void) |
|
static void | xcode_enum_gccxml (void) |
|
static void | xcode_enum_print (void) |
|
static void | enum_read_check (const char *name, int nr, uint64_t v, int rc) |
|
static void | xcode_enum_read (void) |
|
static void | bitmask_print_check (uint64_t mask, int nr, bool ok, const char *out) |
|
static void | xcode_bitmask_print (void) |
|
static void | bitmask_read_check (uint64_t mask, int nr, bool ok, const char *buf) |
|
static void | xcode_bitmask_read (void) |
|
static void | xcode_enum_loop (void) |
|
static void | xcode_enum_field (void) |
|
static void | t_count (struct m0_xcode_type *xt, void *data) |
|
static void | f_count (struct m0_xcode_type *xt, struct m0_xcode_field *field, void *data) |
|
static void | xcode_iterate (void) |
|
static void | flagset (struct m0_xcode_type *xt, uint32_t flags) |
|
static void | fieldset (struct m0_xcode_type *xt, struct m0_xcode_field *field, void *unused) |
|
static void | fieldclear (struct m0_xcode_type *xt, struct m0_xcode_field *field, void *unused) |
|
static void | xcode_flags (void) |
|
int | m0_package_cred_get (const struct m0_xcode_obj *par, const struct m0_xcode_type **out) |
|
◆ __ENUM_ONLY
◆ ARS
#define ARS "<(0, 0x1), (0, 0x1), (0, 0x1), (0, 0x1), (0, 0x1), (0, 0x1)>" |
◆ CHECK
◆ OBJ
◆ tdef
◆ anonymous enum
◆ anonymous enum
◆ anonymous enum
◆ __attribute__() [1/2]
static struct tdata __attribute__ |
( |
(packed) |
| ) |
|
|
static |
◆ __attribute__() [2/2]
__attribute__ |
( |
(unused) |
| ) |
|
◆ bitmask_print_check()
static void bitmask_print_check |
( |
uint64_t |
mask, |
|
|
int |
nr, |
|
|
bool |
ok, |
|
|
const char * |
out |
|
) |
| |
|
static |
◆ bitmask_read_check()
static void bitmask_read_check |
( |
uint64_t |
mask, |
|
|
int |
nr, |
|
|
bool |
ok, |
|
|
const char * |
buf |
|
) |
| |
|
static |
◆ chk()
◆ custom_read()
◆ decode()
◆ enum_read_check()
static void enum_read_check |
( |
const char * |
name, |
|
|
int |
nr, |
|
|
uint64_t |
v, |
|
|
int |
rc |
|
) |
| |
|
static |
◆ f_count()
◆ fieldclear()
◆ fieldset()
◆ flagset()
static void flagset |
( |
struct m0_xcode_type * |
xt, |
|
|
uint32_t |
flags |
|
) |
| |
|
static |
◆ foo_decode()
static int foo_decode |
( |
struct m0_xcode_ctx * |
ctx, |
|
|
void * |
obj |
|
) |
| |
|
static |
◆ foo_encode()
static int foo_encode |
( |
struct m0_xcode_ctx * |
ctx, |
|
|
const void * |
obj |
|
) |
| |
|
static |
◆ foo_length()
static int foo_length |
( |
struct m0_xcode_ctx * |
ctx, |
|
|
const void * |
obj |
|
) |
| |
|
static |
◆ foo_xor()
static void foo_xor |
( |
char * |
buf | ) |
|
|
static |
◆ literal()
static void literal |
( |
const char * |
input, |
|
|
const char * |
output |
|
) |
| |
|
static |
◆ m0_package_cred_get()
◆ t_count()
◆ xcode_bitmask_print()
static void xcode_bitmask_print |
( |
void |
| ) |
|
|
static |
◆ xcode_bitmask_read()
static void xcode_bitmask_read |
( |
void |
| ) |
|
|
static |
◆ xcode_cmp_test()
static void xcode_cmp_test |
( |
void |
| ) |
|
|
static |
◆ xcode_cursor_test()
static void xcode_cursor_test |
( |
void |
| ) |
|
|
static |
◆ xcode_decode_test()
static void xcode_decode_test |
( |
void |
| ) |
|
|
static |
◆ xcode_encode_test()
static void xcode_encode_test |
( |
void |
| ) |
|
|
static |
◆ xcode_enum_field()
static void xcode_enum_field |
( |
void |
| ) |
|
|
static |
◆ xcode_enum_gccxml()
static void xcode_enum_gccxml |
( |
void |
| ) |
|
|
static |
◆ xcode_enum_loop()
static void xcode_enum_loop |
( |
void |
| ) |
|
|
static |
◆ xcode_enum_print()
static void xcode_enum_print |
( |
void |
| ) |
|
|
static |
◆ xcode_enum_read()
static void xcode_enum_read |
( |
void |
| ) |
|
|
static |
◆ xcode_find_test()
static void xcode_find_test |
( |
void |
| ) |
|
|
static |
◆ xcode_flags()
static void xcode_flags |
( |
void |
| ) |
|
|
static |
◆ xcode_init()
static int xcode_init |
( |
void |
| ) |
|
|
static |
◆ xcode_iterate()
static void xcode_iterate |
( |
void |
| ) |
|
|
static |
◆ xcode_length_test()
static void xcode_length_test |
( |
void |
| ) |
|
|
static |
◆ xcode_nonstandard_test()
static void xcode_nonstandard_test |
( |
void |
| ) |
|
|
static |
◆ xcode_opaque_test()
static void xcode_opaque_test |
( |
void |
| ) |
|
|
static |
◆ xcode_print_test()
static void xcode_print_test |
( |
void |
| ) |
|
|
static |
◆ xcode_read_test()
static void xcode_read_test |
( |
void |
| ) |
|
|
static |
◆ __attribute__
enum { ... } __attribute__ |
◆ builtins
Initial value:= {
}
const struct m0_xcode_type M0_XT_OPAQUE
const struct m0_xcode_type M0_XT_U32
const struct m0_xcode_type M0_XT_U8
const struct m0_xcode_type M0_XT_U64
◆ bvec
◆ count
◆ ctx
◆ data
◆ ebuf
◆ ecount
◆ f_x
◆ f_y
◆ foo_addr
◆ foo_buf
◆ foo_bvec
◆ foo_count
◆ foo_ops
Initial value:= {
}
static int foo_length(struct m0_xcode_ctx *ctx, const void *obj)
static int foo_decode(struct m0_xcode_ctx *ctx, void *obj)
static int foo_encode(struct m0_xcode_ctx *ctx, const void *obj)
Definition at line 569 of file xcode.c.
◆ read_ops
Initial value:= {
}
static int custom_read(const struct m0_xcode_cursor *it, struct m0_xcode_obj *obj, const char *str)
Definition at line 663 of file xcode.c.
Initial value:= {
.t_foo = {
.f_x = 7,
.f_y = 8
},
.t_flag = 0xF,
.t_v = {
},
.t_un = {
.u_tag = 4
},
.t_opaq = {
},
.t_ar = {
.a_el = {
[0] = { 0, 1 },
[1] = { 1, 1 },
[2] = { 2, 1 },
[3] = { 3, 1 },
[4] = { 4, 1 },
[5] = { 5, 1 }
}
}
}
Definition at line 138 of file xcode.c.
◆ vec
◆ xcode_ut
Initial value:= {
.ts_name = "xcode-ut",
.ts_tests = {
}
}
static void xcode_find_test(void)
static int xcode_init(void)
static void xcode_length_test(void)
static void xcode_enum_gccxml(void)
static void xcode_opaque_test(void)
static void xcode_encode_test(void)
static void xcode_decode_test(void)
static void xcode_enum_read(void)
static void xcode_nonstandard_test(void)
static void xcode_read_test(void)
static void xcode_cursor_test(void)
static void xcode_enum_field(void)
static void xcode_enum_loop(void)
static void xcode_flags(void)
static void xcode_print_test(void)
static void xcode_iterate(void)
static void xcode_enum_print(void)
static void xcode_bitmask_print(void)
static void xcode_cmp_test(void)
static void xcode_bitmask_read(void)
Definition at line 1273 of file xcode.c.
◆ xut_ar
Initial value:= {
.xt = {
.xct_name = "ar",
.xct_sizeof =
sizeof (
struct ar),
.xct_nr = 1
}
}
Definition at line 118 of file xcode.c.
◆ xut_foo
Initial value:= {
.xt = {
.xct_name = "foo",
.xct_sizeof =
sizeof (
struct foo),
.xct_nr = 2
}
}
Definition at line 109 of file xcode.c.
◆ xut_tdef
Initial value:= {
.xt = {
.xct_name = "tdef",
.xct_sizeof =
sizeof (
tdef),
.xct_nr = 1
}
}
Definition at line 91 of file xcode.c.
◆ xut_top
Initial value:= {
.xt = {
.xct_name = "top",
.xct_sizeof =
sizeof (
struct top),
.xct_nr = 7
}
}
Definition at line 127 of file xcode.c.
◆ xut_un
Initial value:= {
.xt = {
.xct_name = "un",
.xct_sizeof =
sizeof (
struct un),
.xct_nr = 3
}
}
Definition at line 82 of file xcode.c.
◆ xut_v
Initial value:= {
.xt = {
.xct_name = "v",
.xct_sizeof = sizeof (struct v),
.xct_nr = 2
}
}
Definition at line 100 of file xcode.c.