summaryrefslogtreecommitdiffstats
path: root/src/engine/tests/old_node_tree_test.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-06-10 01:52:02 +0000
committerDavid Robillard <d@drobilla.net>2006-06-10 01:52:02 +0000
commit98fe0e7056e6697396249531785d3899f94d79be (patch)
tree233319008d4bfb6c8bdc546bdf4a81b87ecf7f3a /src/engine/tests/old_node_tree_test.cpp
parent6c8eaee73b0ea66216744f49b452e22e26fe83e1 (diff)
downloadingen-98fe0e7056e6697396249531785d3899f94d79be.tar.gz
ingen-98fe0e7056e6697396249531785d3899f94d79be.tar.bz2
ingen-98fe0e7056e6697396249531785d3899f94d79be.zip
More juggling
git-svn-id: http://svn.drobilla.net/lad/grauph@15 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/tests/old_node_tree_test.cpp')
-rw-r--r--src/engine/tests/old_node_tree_test.cpp72
1 files changed, 0 insertions, 72 deletions
diff --git a/src/engine/tests/old_node_tree_test.cpp b/src/engine/tests/old_node_tree_test.cpp
deleted file mode 100644
index 3b5ed485..00000000
--- a/src/engine/tests/old_node_tree_test.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-#include <iostream>
-#include "../NodeTree.h"
-#include "../NodeBase.h"
-
-using std::cout; using std::cerr; using std::endl;
-
-int main()
-{
- cout << "\n\n\n\n";
-
- NodeBase* n = NULL;
- TreeNode* tn = NULL;
- TreeNode* baz = NULL;
- TreeNode* quuux = NULL;
- TreeNode* bar = NULL;
-
- NodeTree tree;
- n = new NodeBase("foo", 0, 0, 0);
- tn = new TreeNode(n);
- tree.insert(tn);
- n = new NodeBase("bar", 0, 0, 0);
- bar = new TreeNode(n);
- tree.insert(bar);
- n = new NodeBase("baz", 0, 0, 0);
- baz = new TreeNode(n);
- tree.insert(baz);
- n = new NodeBase("quux", 0, 0, 0);
- tn = new TreeNode(n);
- tree.insert(tn);
- n = new NodeBase("quuux", 0, 0, 0);
- quuux = new TreeNode(n);
- tree.insert(quuux);
- n = new NodeBase("quuuux", 0, 0, 0);
- tn = new TreeNode(n);
- tree.insert(tn);
-
-
- cout << "Added 6 nodes." << endl;
- cout << "Tree size: " << tree.size() << endl << endl;
-
- cout << "Iterating: " << endl;
- for (NodeTree::iterator i = tree.begin(); i != tree.end(); ++i) {
- cout << (*i)->name() << endl;
- }
-
- cout << endl << "Search 'foo' - " << tree.find("foo")->name() << endl;
- cout << endl << "Search 'bar' - " << tree.find("bar")->name() << endl;
- cout << endl << "Search 'baz' - " << tree.find("baz")->name() << endl;
- cout << endl << "Search 'quux' - " << tree.find("quux")->name() << endl;
- cout << endl << "Search 'quuux' - " << tree.find("quuux")->name() << endl;
- cout << endl << "Search 'quuuux' - " << tree.find("quuuux")->name() << endl;
- cout << endl << "Search 'dave' - " << tree.find("dave") << endl;
- cout << endl << "Search 'fo' - " << tree.find("fo") << endl << endl;
-
- cout << "Removing 'baz'." << endl;
- tree.remove(baz);
-
- cout << "Iterating: " << endl;
- for (NodeTree::iterator i = tree.begin(); i != tree.end(); ++i) {
- cout << (*i)->name() << endl;
- }
-
- cout << "Removing 'bar' (the root): " << endl;
- tree.remove(bar);
-
- cout << "Iterating: " << endl;
- for (NodeTree::iterator i = tree.begin(); i != tree.end(); ++i) {
- cout << (*i)->name() << endl;
- }
-
- return 0;
-}