28 #ifndef __MU_OPTION_H__
29 #define __MU_OPTION_H__
32 #include <moonunit/type.h>
33 #include <moonunit/internal/boilerplate.h>
41 const char* description;
44 #define MU_OPTION(_name, _type, _get, _set, _description) \
46 FIELD(name, (_name)), \
47 FIELD(type, (_type)), \
50 FIELD(description, (_description)) \
53 #define MU_OPTION_END \
56 FIELD(type, MU_TYPE_UNKNOWN), \
59 FIELD(description, NULL) \
64 void mu_option_set_string(
MuOption* table,
void*
object,
const char *name,
const char* value);
65 void mu_option_setv(
MuOption* table,
void*
object,
const char *name, va_list ap);
66 void mu_option_set(
MuOption* table,
void*
object,
const char *name, ...);
67 void mu_option_get(
MuOption* table,
void*
object,
const char *name,
void* res);
68 char* mu_option_get_string(
MuOption* table,
void*
object,
const char *name);
69 MuType mu_option_type(
MuOption* table,
const char* name);
70 const char* mu_option_description(
MuOption* table,
const char *name);