Mercurial > hg > GearsTemplate
changeset 476:4b5f9884b777
add rbTreeTest remove
author | ryokka |
---|---|
date | Thu, 28 Dec 2017 15:02:23 +0900 |
parents | fae47dc256b6 |
children | c3202635c20a |
files | src/parallel_execution/RedBlackTree.cbc src/parallel_execution/Tree.h src/parallel_execution/test/rbTree_test.cbc |
diffstat | 3 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parallel_execution/RedBlackTree.cbc Thu Dec 28 12:59:11 2017 +0900 +++ b/src/parallel_execution/RedBlackTree.cbc Thu Dec 28 15:02:23 2017 +0900 @@ -314,6 +314,7 @@ goto next(...); } + __code removeRedBlackTree(struct RedBlackTree* tree, struct Node* node, __code next(...)) { struct Node* newNode = &ALLOCATE(context, Node)->Node; struct Node* root = tree->root;
--- a/src/parallel_execution/Tree.h Thu Dec 28 12:59:11 2017 +0900 +++ b/src/parallel_execution/Tree.h Thu Dec 28 15:02:23 2017 +0900 @@ -6,7 +6,7 @@ struct Node* node; __code put(Impl* tree,Type* node, __code next(...)); // __code get(Impl* tree, __code next(...)); - // __code removeRedBlackTree(); + __code remove(Impl* tree,Type* node, __code next(...)); // __code clearRedBlackTree(); __code next(...); } Tree;
--- a/src/parallel_execution/test/rbTree_test.cbc Thu Dec 28 12:59:11 2017 +0900 +++ b/src/parallel_execution/test/rbTree_test.cbc Thu Dec 28 15:02:23 2017 +0900 @@ -69,9 +69,9 @@ printf("test5\n"); Node* node = new Node(); node->value = (union Data*)new Int(); - node->value->Int = 7; - node->key = 7; - goto exit_code(context); + node->value->Int = 8; + node->key = 8; + goto tree->remove(node,exit_code); } __code rbTreeTest5_stub(struct Context* context) {