MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / check_sTree

Function check_sTree

libCacheSim/dataStructure/splay.c:259–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

257}
258
259void 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

Callers

nothing calls this directly

Calls 2

assertFunction · 0.85
node_valueFunction · 0.85

Tested by

no test coverage detected