Testkopefe geschrieben

This commit is contained in:
silvana884 2025-12-10 10:47:57 +01:00
parent b3c9fec7ba
commit bc24ca7b46
2 changed files with 50 additions and 2 deletions

48
binTreeTest.c Normal file
View File

@ -0,0 +1,48 @@
#include <stdlib.h>
#include <stdio.h>
#include "bintree.h"
#include "unity.h"
static int compare(const void *a, const void *b)
{
return (*(int *)a > *(int *)b) - (*(int *)a < *(int *)b); // a und b werden in int konvertiert und deren Werte miteinander verglichen
// returns 1 for a>b or -1 for a<b
// in bintree.c wird ueberprueft, ob compare eine positive oder eine negative Zahl zurueckgibt,
// wenn a groeßer b, positiv und dann wird links nach Teilbauemen gesucht
}
void setUp() {}
void tearDown() {}
//Adds a single element to the tree
void add_single_element_to_Tree()
{
}
//Adds multiplie elements to a tree, just one element should be in the tree twice
void add_multiple_elements_to_Tree()
{
}
//Detects the size of a tree
void detect_size()
{
}
//Tests, wether one duplicate is in the tree
void detect_duplicate()
{
}
//Traverses the three inorder to check wether nextTreeData works
void whole_tree()
{
}
//Tests, wether whole tree is deleted from memory
void delete_tree()
{
}

View File

@ -11,7 +11,7 @@ The latest element is taken from the stack. */
typedef{
void* data;
struct StackNode *next;
}StackNode;cmd
}StackNode;
// Pushes data as pointer onto the stack.