#include <stdio.h>
#include <serene/rt/context.h>
#include <serene/rt/impl/seq.h>
#include "base.h"
Go to the source code of this file.
◆ SEQ_TEST_LOG
| #define SEQ_TEST_LOG |
( |
| ... | ) |
|
◆ SEQ_TESTS
Value:
void test_seq_push_more_than_32()
void test_seq_push_less_than_32()
static void test_seq_empty()
Definition at line 28 of file seq_tests.h.
28#define SEQ_TESTS(X) \
29 X("seq::empty", test_seq_empty), \
30 X("seq::push_less_than_32", test_seq_push_less_than_32), \
31 X("seq::push_more_than_32", test_seq_push_more_than_32)
◆ seq_dummy
| typedef struct seq_dummy seq_dummy |
◆ test_seq_empty()
| static void test_seq_empty |
( |
| ) |
|
|
static |
Definition at line 44 of file seq_tests.h.
44 {
48
53
56}
#define RELEASE_CONTEXT(x)
#define SHUTDOWN_ENGINE(mm, engine)
#define MAKE_ENGINE(mm, engine)
#define MAKE_CONTEXT(engine, x)
seq_t seq_empty(const srn_context_t *ctx)
◆ test_seq_push_less_than_32()
| void test_seq_push_less_than_32 |
( |
| ) |
|
Definition at line 58 of file seq_tests.h.
58 {
61
69
77
80}
seq_t seq_push(const srn_context_t *ctx, const seq_t *seq, seq_elem_t x)
void * seq_elem_t
We use generic pointers to refer to internal nodes, leaf nodes and even elements.
◆ test_seq_push_more_than_32()
| void test_seq_push_more_than_32 |
( |
| ) |
|
Definition at line 82 of file seq_tests.h.
82 {
85
87
88 for (int i = 0; i < 2000; i++) {
89
94 }
95
100
102
106
111
112 for (int i = 0; i < 2000; i++) {
117
121 };
122
125}
#define ASSERT_NOT_NULL(x)
seq_lookup_result_t seq_get(const srn_context_t *ctx, const seq_t *seq, size_t n)
Negative index is not supported.
#define SEQ_TEST_LOG(...)
size_t len
logical length.
seq_node_t * root
NULL means “all data is in tail”
seq_elem_t * tail
small tail array for fast push/pop.
uint16_t tail_len
0..SEQ_BR