Test?

Out of boredom I made a simple tree data structure, but I'm not sure how to test it... Would anyone mind testing it for me?

http://pastebin.com/zk3985yi

It supports addition and removal of individual nodes, pruning and grafting of subtrees, finding a value, calculating size of subtrees, and calculating node depth in a tree.

Any questions, bugs, errors, or suggestions can be posted here.
If no one has the time, or the will, to test this, could you at least give me an example application of it?
You don't need a useful application to be able to test.

Furthermore, a programmer is someone who can design, implement, and test their code. (and fix the bugs too).

Write unit tests that test every member function in all the normal working cases, all the edge cases, and error scenarios.

If no one has the time, or the will, to test this, could you at least give me an example application of it?


If you subscribe to Test-Driven methodology, you would have written your test cases and testing harness code even BEFORE you start to code your tree data structure. Then you won't be asking ppl in this forum to help you test it isn't it ? Unless your test cases is not complete (which btw occur quite often in reality) :P
jsmith wrote:
A programmer is someone who can design, implement, and test their code.

Amen, brother.
Topic archived. No new replies allowed.