DobleSpiel/test_stack.c
2025-12-07 12:28:46 +01:00

20 lines
409 B
C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "stack.h"
void testPushAddsElementCorrectly(void)
{
int a = 10;
StackNode *node = push(NULL, &a);
TEST_ASSERT_NOT_NULL(node);
TEST_ASSERT_EQUAL_INT(a, *((int*)node->data)); //void Zeiger in integer-Zeiger umwandeln
}
int main(void)
{
UNITY_BEGIN();
RUN_TEST(testPushAddsElementCorrectly);
return UNITY_END();
}