Home | History | Annotate | Download | only in tests

Lines Matching refs:root

88   GNode *root;
100 root = g_node_new (C2P ('A'));
101 TEST (NULL, g_node_depth (root) == 1 && g_node_max_height (root) == 1);
104 g_node_append (root, node_B);
105 TEST (NULL, root->children == node_B);
113 g_node_append (root, node_F);
114 TEST (NULL, root->children->next == node_F);
124 TEST (NULL, g_node_depth (root) == 1);
125 TEST (NULL, g_node_max_height (root) == 4);
127 TEST (NULL, g_node_n_nodes (root, G_TRAVERSE_LEAFS) == 7);
128 TEST (NULL, g_node_n_nodes (root, G_TRAVERSE_NON_LEAFS) == 4);
129 TEST (NULL, g_node_n_nodes (root, G_TRAVERSE_ALL) == 11);
132 TEST (NULL, g_node_find_child (root, G_TRAVERSE_ALL, C2P ('F')) == node_F);
133 TEST (NULL, g_node_find (root, G_LEVEL_ORDER, G_TRAVERSE_NON_LEAFS, C2P ('I')) == NULL);
134 TEST (NULL, g_node_find (root, G_IN_ORDER, G_TRAVERSE_LEAFS, C2P ('J')) == node_J);
158 g_node_traverse (root, G_PRE_ORDER, G_TRAVERSE_ALL, -1, node_build_string, &tstring);
161 g_node_traverse (root, G_POST_ORDER, G_TRAVERSE_ALL, -1, node_build_string, &tstring);
164 g_node_traverse (root, G_IN_ORDER, G_TRAVERSE_ALL, -1, node_build_string, &tstring);
167 g_node_traverse (root, G_LEVEL_ORDER, G_TRAVERSE_ALL, -1, node_build_string, &tstring);
171 g_node_traverse (root, G_LEVEL_ORDER, G_TRAVERSE_LEAFS, -1, node_build_string, &tstring);
174 g_node_traverse (root, G_PRE_ORDER, G_TRAVERSE_NON_LEAFS, -1, node_build_string, &tstring);
181 g_node_traverse (root, G_LEVEL_ORDER, G_TRAVERSE_ALL, -1, node_build_string, &tstring);
188 g_node_traverse (root, G_LEVEL_ORDER, G_TRAVERSE_ALL, -1, node_build_string, &tstring);
192 g_node_destroy (root);
196 root = g_node_new (NULL);
197 node = root;
205 TEST (NULL, g_node_max_height (root) > 100);
206 TEST (NULL, g_node_n_nodes (root, G_TRAVERSE_ALL) == 1 + 2048);
208 g_node_destroy (root);