55 for(count = 0, node = t->
samen; node != t; node = node->
samen, count++)
60 printf(
" [%d more]\n", count);
97 int rem = (
i + 7)%NUM_NODES;
100 printf(
"remove pointer %d, payload %ld\n", rem,
101 (
long)(
nodes[rem].payload));
105 printf(
"remove %d failed!\n", rem);
110 fail_unless(root == NULL,
"tree not empty after removing all nodes");
120 for(
j = 0;
j <=
i % 3;
j++) {
121 size_t payload = key.
tv_usec*10 +
j;
128 for(
i = 0;
i <= 1100;
i += 100) {
129 printf(
"Removing nodes not larger than %d\n",
i);
132 while(removed != NULL) {
133 printf(
"removed payload %ld[%ld]\n", (
long)(removed->
payload) / 10,
134 (
long)(removed->
payload) % 10);
139 fail_unless(root == NULL,
"tree not empty when it should be");
fail_unless(root==NULL,"tree not empty after removing all nodes")
struct Curl_tree * Curl_splaygetbest(struct curltime i, struct Curl_tree *t, struct Curl_tree **removed)
struct Curl_tree * larger
struct Curl_tree * removed
UNITTEST_START char * output
struct Curl_tree * smaller
curl_easy_setopt expects a curl_off_t argument for this option curl_easy_setopt expects a curl_write_callback argument for this option curl_easy_setopt expects a curl_ioctl_callback argument for this option curl_easy_setopt expects a curl_opensocket_callback argument for this option curl_easy_setopt expects a curl_debug_callback argument for this option curl_easy_setopt expects a curl_conv_callback argument for this option curl_easy_setopt expects a private data pointer as argument for this option curl_easy_setopt expects a FILE *argument for this option curl_easy_setopt expects a struct curl_httppost *argument for this option curl_easy_setopt expects a struct curl_slist *argument for this option curl_easy_getinfo expects a pointer to char *for this info curl_easy_getinfo expects a pointer to double for this info curl_easy_getinfo expects a pointer to struct curl_tlssessioninfo *for this info curl_easy_getinfo expects a pointer to curl_socket_t for this info size_t
static void unit_stop(void)
struct Curl_tree * Curl_splayinsert(struct curltime i, struct Curl_tree *t, struct Curl_tree *node)
struct Curl_tree nodes[NUM_NODES *3]
int Curl_splayremovebyaddr(struct Curl_tree *t, struct Curl_tree *removenode, struct Curl_tree **newroot)
static CURLcode unit_setup(void)
static void splayprint(struct Curl_tree *t, int d, char output)