aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2024-07-26 02:17:31 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2024-07-26 02:54:02 +0100
commit9ea4341a8093d4d8c907b2e854fb2d8d399da753 (patch)
tree94347cc2325d14560813cd94b49ffcb75d7113cb /src
parent93d3ce89cc96d3b73940ba566ae181abd109560a (diff)
downloadcw_tree-9ea4341a8093d4d8c907b2e854fb2d8d399da753.tar.gz
cw_tree-9ea4341a8093d4d8c907b2e854fb2d8d399da753.tar.bz2
cw_tree-9ea4341a8093d4d8c907b2e854fb2d8d399da753.zip
A simple test, iterating 10 times and printing out the generated tree
Seems to work!
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index e013202..d7f720c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -152,6 +152,12 @@ void iterate(void)
int main(void)
{
- puts("Hello, world!");
+ word_t root = alloc_node(Fraction{2, 4});
+ to_iterate.push(root);
+ for (int i = 0; i < 10; ++i)
+ {
+ iterate();
+ printf("step[%d]:\n%s\n\n", i, to_string(nodes[root]).c_str());
+ }
return 0;
}