| 41 | } |
| 42 | |
| 43 | static void test_token_tree_cpp(int max) |
| 44 | { |
| 45 | acl::token_tree tree; |
| 46 | |
| 47 | for (int i = 0; tokens[i] != NULL; i++) { |
| 48 | tree.insert(tokens[i]); |
| 49 | } |
| 50 | |
| 51 | acl::meter_time(__FUNCTION__, __LINE__, "begin\t"); |
| 52 | |
| 53 | int j = 0; |
| 54 | for (int i = 0; i < max; i++) { |
| 55 | const acl::token_node* node = tree.find(tokens[j]); |
| 56 | if (node == NULL) { |
| 57 | printf("find error, key=%s\r\n", tokens[j]); |
| 58 | break; |
| 59 | } |
| 60 | if (tokens[++j] == NULL) { |
| 61 | j = 0; |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | acl::meter_time(__FUNCTION__, __LINE__, "end\t"); |
| 66 | } |
| 67 | |
| 68 | static void test_htable(int max) |
| 69 | { |
no test coverage detected
searching dependent graphs…