Go to the source code of this file.
◆ SYMBOL_TESTS
| #define SYMBOL_TESTS |
( |
| X | ) |
|
Value:
static void test_gensym_freshness()
static void test_gensym()
static void test_symbol_intern()
static void test_symbol_make()
Definition at line 28 of file symbol_tests.h.
28#define SYMBOL_TESTS(X) \
29 X("symbol::make", test_symbol_make), X("symbol::intern_symbol", test_symbol_intern), \
30 X("symbol::gensym", test_gensym), X("symbol::gensym_freshness", test_gensym_freshness)
◆ test_gensym()
Definition at line 77 of file symbol_tests.h.
77 {
80
83
86
89
90
92
95
98
101}
#define RELEASE_CONTEXT(x)
#define SHUTDOWN_ENGINE(mm, engine)
#define MAKE_ENGINE(mm, engine)
#define MAKE_CONTEXT(engine, x)
srn_metadata_t absurd_metadata
We use this for testing. Defined once in core.c.
#define AS_SYMBOL(value_ref)
#define AS_STRING(value_ref)
#define IS_A(value_ref, field)
srn_value_t * srn_namespace_make(srn_context_t *ctx, srn_metadata_t *metadata, srn_string_t *name)
Creates a new namespace in the give context.
srn_value_t * srn_string_make(srn_context_t *ctx, srn_metadata_t *metadata, const char *src)
Create a string from a null terminated C string.
bool srn_string_eq(const srn_string_t *a, const srn_string_t *b)
srn_value_t * srn_symbol_gen(srn_context_t *ctx, srn_metadata_t *metadata, srn_namespace_t *ns, srn_string_t *optional_name)
◆ test_gensym_freshness()
| void test_gensym_freshness |
( |
| ) |
|
|
static |
Definition at line 106 of file symbol_tests.h.
106 {
109
112
113
114
115
119
122
123
127
130}
srn_value_t * srn_symbol_intern(srn_context_t *ctx, srn_metadata_t *metadata, srn_namespace_t *ns, srn_string_t *symbol_name)
◆ test_symbol_intern()
| void test_symbol_intern |
( |
| ) |
|
|
static |
Definition at line 50 of file symbol_tests.h.
50 {
53
56
59
61
65
72
75}
#define IS_TRUE(value_ref)
srn_value_t * srn_value_eq(const srn_context_t *ctx, const srn_value_t *a, const srn_value_t *b)
Check to values for equality. Return a boolean.
◆ test_symbol_make()
| void test_symbol_make |
( |
| ) |
|
|
static |
Definition at line 32 of file symbol_tests.h.
32 {
35
40
43
45
48}
srn_value_t * srn_symbol_make(srn_context_t *ctx, srn_metadata_t *metadata, srn_namespace_t *ns, srn_string_t *name)
Create a new symbol. IT DOES NOT INTERNALIZE THE SYMBOL.