forked from freudenreichan/info2Praktikum-DobleSpiel
28 lines
563 B
C
28 lines
563 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include "stack.h"
|
|
#include "unity.h"
|
|
|
|
//Initialisierung
|
|
void setUp(void){}
|
|
void tearDown(void){}
|
|
|
|
void test_push_created_new_stacknode(void)
|
|
{
|
|
int testdata1 = 111;
|
|
StackNode test = {&testdata1,NULL};
|
|
int testdata2 = 222;
|
|
|
|
StackNode *test1 = push(&test,&testdata2);
|
|
TEST_ASSERT_NOT_NULL(test1);
|
|
TEST_ASSERT_EQUAL_PTR(&testdata2,test1->data);
|
|
TEST_ASSERT_EQUAL_PTR(&test,test1->next);
|
|
}
|
|
|
|
int main(void)
|
|
{
|
|
UNITY_BEGIN();
|
|
|
|
RUN_TEST(test_push_created_new_stacknode);
|
|
return UNITY_END();
|
|
} |