X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=blobdiff_plain;f=nucleus%2Flibrary%2Ftests_nodes%2Ftest_symbol_tree.cpp;fp=nucleus%2Flibrary%2Ftests_nodes%2Ftest_symbol_tree.cpp;h=fa4a5c8cb40c198b7db12eb60b45a14a365629d8;hp=bc938d1d80eefbea49a430a403bd700fb878ca57;hb=092bb1f6c64b3caf3d9b36577d0900fdf6c2af26;hpb=49d903f63b2681d0fd062a577c42a9d3678a3c08 diff --git a/nucleus/library/tests_nodes/test_symbol_tree.cpp b/nucleus/library/tests_nodes/test_symbol_tree.cpp index bc938d1d..fa4a5c8c 100644 --- a/nucleus/library/tests_nodes/test_symbol_tree.cpp +++ b/nucleus/library/tests_nodes/test_symbol_tree.cpp @@ -28,9 +28,6 @@ #include #include -//#include -//#include - using namespace application; using namespace basis; using namespace filesystem; @@ -60,12 +57,11 @@ public: int test_symbol_tree::execute() { FUNCDEF("execute"); - LOG("please check memory usage and record it, then hit a key to start testing."); try { - // creates a crazy tree with only one branch per node, but 40,000 deep. - symbol_tree t("blork"); - symbol_tree *curr = &t; + // creates a crazy tree with only one branch per node, but hugely deep. + symbol_tree *t = new symbol_tree("blork"); + symbol_tree *curr = t; for (int i = 0; i < MAX_NODES_TESTED; i++) { // if the current node has any branches, we'll jump on one as the next // place. @@ -77,17 +73,16 @@ int test_symbol_tree::execute() astring rando = string_manipulation::make_random_name(1, 10); curr->add(new symbol_tree(rando)); } - LOG("check memory usage now with full size. then hit a key."); +LOG("about to whack dynamic tree..."); + WHACK(t); +LOG("dynamic tree whacked."); } catch (...) { LOG("crashed during tree stuffing."); return 1; } - LOG("check memory usage after the run. then hit a key to end " - "the program."); - -//create a more balanced tree structure... -//perform known operations and validate shape of tree. +//hmmm: create a more balanced tree structure... +// perform known operations and validate shape of tree. return final_report(); }