created bintreeTests.c
This commit is contained in:
parent
2176383f1e
commit
b50bd58dac
30
bintreeTests.c
Normal file
30
bintreeTests.c
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include "unity.h"
|
||||||
|
#include "bintree.h"
|
||||||
|
|
||||||
|
|
||||||
|
// test if addToTree expands tree correctly
|
||||||
|
// by going down the path where the given pice of data is expected
|
||||||
|
// and checking if the pice of data is found there
|
||||||
|
|
||||||
|
|
||||||
|
// test if nextTreeData returns the next pice of data correctly
|
||||||
|
// needs Stack!!!
|
||||||
|
|
||||||
|
|
||||||
|
// test if clear Tree frees all node.name and node memory AND sets them to zero
|
||||||
|
// aditionally tests if the memoryspaces have been cleared
|
||||||
|
|
||||||
|
|
||||||
|
// tests if treeSize returns correct amount of nodes in Tree
|
||||||
|
// by using addNode a given number of times and testing to see if
|
||||||
|
// the treeSize matches the number of nodes added
|
||||||
|
|
||||||
|
|
||||||
|
// main, strings together all tests
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
printf("\n============================\nBinary Tree tests\n============================\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user