Go to the documentation of this file.
3 #include "../tests/testutil.hpp"
22 return static_cast<int> (strlen (
reinterpret_cast<const char *
> (
data_)));
64 bool res = mtrie.
add (test_name,
getlen (test_name), &pipe);
82 bool res = mtrie.
add (test_name,
getlen (test_name), &pipe);
86 res = mtrie.
add (test_name,
getlen (test_name), &pipe);
103 bool res = mtrie.
add (test_name,
getlen (test_name), &pipe_1);
107 res = mtrie.
add (test_name,
getlen (test_name), &pipe_2);
126 bool res = mtrie.
add (test_name_prefix,
getlen (test_name_prefix), &pipe_1);
130 res = mtrie.
add (test_name_full,
getlen (test_name_full), &pipe_2);
146 mtrie.
add (test_name,
getlen (test_name), &pipe);
149 mtrie.
rm (test_name,
getlen (test_name), &pipe);
176 mtrie.
rm (test_name,
getlen (test_name), &pipe);
194 mtrie.
add (add_name_data,
getlen (add_name_data), &addpipe);
198 mtrie.
rm (rm_name_data,
getlen (rm_name_data), &rmpipe);
209 if (strncmp (add_name_, rm_name_,
210 std::min (strlen (add_name_), strlen (rm_name_) + 1))
248 bool res = mtrie_.
add (name_data,
getlen (name_data), &pipes_[
i_]);
257 const char *names[] = {
"foo1",
"foo2",
"foo3"};
268 mtrie.
rm (name_data,
getlen (name_data), &pipes[1]);
276 const char *(&names_)[N])
278 for (
size_t i = 0;
i < N; ++
i) {
287 const char *names[] = {
"foo1",
"foo2",
"foo3"};
292 for (
size_t i = 0;
i <
sizeof (names) /
sizeof (names[0]); ++
i) {
304 const char *names[] = {
"foo1",
"foo2",
"foo3"};
307 for (
int i = 2;
i >= 0; --
i) {
309 static_cast<size_t> (
i));
313 for (
size_t i = 0;
i < 3; ++
i) {
328 for (
size_t i = 0;
i < N; ++
i) {
333 mtrie.
rm (name_data,
getlen (name_data), &pipes[
i]);
341 const char *names[] = {
"foo1",
"foo2",
"foo3"};
347 const char *names[] = {
"foo3",
"foo2",
"foo1"};
365 for (
size_t i = 0;
i < N; ++
i) {
372 const char *names[] = {
"foo1",
"foo2",
"foo3"};
379 const char *names[] = {
"foo3",
"foo2",
"foo1"};
397 const char *
name =
"foo";
402 bool res = mtrie_.
add (name_data,
getlen (name_data), &pipes_[0]);
405 res = mtrie_.
add (name_data,
getlen (name_data), &pipes_[1]);
void test_rm_nonexistent_nonempty_prefix()
void rm(value_t *value_, void(*func_)(const unsigned char *data_, size_t size_, Arg arg_), Arg arg_, bool call_on_uniq_)
void check_count(zmq::generic_mtrie_t< int >::prefix_t data_, size_t len_, int *count_)
GLuint const GLchar * name
void test_rm_multiple_reverse_order()
#define TEST_ASSERT_EQUAL_STRING_LEN(expected, actual, len)
int getlen(const zmq::generic_mtrie_t< int >::prefix_t &data_)
void test_add_single_entry_match_exact()
#define TEST_ASSERT_TRUE(condition)
#define TEST_ASSERT_EQUAL_UINT(expected, actual)
void add_indexed_expect_unique(zmq::generic_mtrie_t< int > &mtrie_, int *pipes_, const char **names_, size_t i_)
void add_and_rm_entries(const char *(&names_)[N])
void test_add_rm_single_entry_match_exact()
void test_rm_nonexistent_nonempty_differentname()
void add_entries(zmq::generic_mtrie_t< int > &mtrie_, int(&pipes_)[N], const char *(&names_)[N])
void add_entries_rm_pipes_unique(const char *(&names_)[N])
#define TEST_ASSERT_FALSE(condition)
uint32_t num_prefixes() const
void check_name(zmq::generic_mtrie_t< int >::prefix_t data_, size_t len_, const char *name_)
void mtrie_count(int *pipe_, int *count_)
void test_check_empty_match_nonempty_data()
void test_check_empty_match_empty_data()
void test_rm_nonexistent_empty()
#define LIBZMQ_UNUSED(object)
void test_rm_nonexistent_nonempty_samename()
bool add(prefix_t prefix_, size_t size_, value_t *value_)
void test_add_single_entry_twice_match_exact()
void test_rm_with_callback_duplicate_uniq_only()
void test_rm_nonexistent_nonempty_prefixed()
#define TEST_ASSERT_EQUAL(expected, actual)
#define TEST_ASSERT_EQUAL_INT(expected, actual)
void test_rm_nonexistent_between()
void test_add_and_rm_other(const char *add_name_, const char *rm_name_)
void test_rm_nonexistent_0_size_empty()
void test_add_two_entries_with_same_name_match_exact()
void test_add_multiple_reverse()
void test_rm_with_callback_multiple_in_order()
void add_duplicate_entry(zmq::generic_mtrie_t< int > &mtrie_, int(&pipes_)[2])
void test_rm_with_callback_multiple_reverse_order()
void setup_test_environment(int timeout_seconds_)
#define TEST_ASSERT_GREATER_OR_EQUAL(threshold, actual)
void test_add_two_entries_match_prefix_and_exact()
void test_rm_with_callback_duplicate()
void test_rm_multiple_in_order()
void match(prefix_t data_, size_t size_, void(*func_)(value_t *value_, Arg arg_), Arg arg_)
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:00