| 257 | } |
| 258 | |
| 259 | void check_sTree(sTree* t){ |
| 260 | /* check the value of sTree node, make sure all values are correct in the sTree */ |
| 261 | if (t==NULL) |
| 262 | return; |
| 263 | assert(node_value(t) == node_value(t->left)+node_value(t->right)+1); |
| 264 | if (t->left != NULL) |
| 265 | check_sTree(t->left); |
| 266 | if (t->right != NULL) |
| 267 | check_sTree(t->right); |
| 268 | } |
| 269 | |
| 270 | |
| 271 | #ifdef __cplusplus |
nothing calls this directly
no test coverage detected