MCPcopy Create free account
hub / github.com/acl-dev/acl / test1

Function test1

lib_acl_cpp/samples/token_tree/main.cpp:4–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include "util.h"
3
4static void test1(const char* tokens[])
5{
6 acl::token_tree tree;
7
8 for (size_t i = 0; tokens[i] != NULL; i++) {
9 printf("add token=%s\r\n", tokens[i]);
10 tree.insert(tokens[i]);
11 }
12
13 printf("======================================================\r\n");
14 for (size_t i = 0; tokens[i] != NULL; i++) {
15 const acl::token_node* node = tree.find(tokens[i]);
16 if (node == NULL) {
17 printf("can't found %s\r\n", tokens[i]);
18 break;
19 }
20 printf("ok, find it, key=%s\r\n", node->get_key());
21 }
22}
23
24static void test2(void)
25{

Callers 1

mainFunction · 0.70

Calls 3

insertMethod · 0.80
findMethod · 0.45
get_keyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…