generated from freudenreichan/info2Praktikum-DobleSpiel
20 lines
409 B
C
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();
|
|
} |