Debugging Unity Aufruf
This commit is contained in:
parent
53c12ce0ed
commit
79a6eb7267
28
test_stack.c
28
test_stack.c
@ -15,7 +15,7 @@ void tearDown(void) {
|
||||
|
||||
void testeStackBeschreiben()
|
||||
{
|
||||
printf("=== Test: push() ===\n");
|
||||
//printf("=== Test: push() ===\n");
|
||||
|
||||
StackNode *stack = NULL;
|
||||
int wert1 = 42;
|
||||
@ -24,7 +24,7 @@ void testeStackBeschreiben()
|
||||
int *topValue = (int *)(stack->data);
|
||||
|
||||
TEST_ASSERT_NOT_NULL(topValue);
|
||||
TEST_ASSERT_EQUAL_INT(42, topValue);
|
||||
TEST_ASSERT_EQUAL_INT(42, *topValue);
|
||||
|
||||
/*if(topValue != NULL && *topValue == 42)
|
||||
{
|
||||
@ -43,9 +43,9 @@ void testeStackBeschreiben()
|
||||
int *secondValue = (int *)((stack->next)->data);
|
||||
|
||||
TEST_ASSERT_NOT_NULL(topValue);
|
||||
TEST_ASSERT_EQUAL_INT(12, topValue);
|
||||
TEST_ASSERT_EQUAL_INT(12, *topValue);
|
||||
TEST_ASSERT_NOT_NULL(secondValue);
|
||||
TEST_ASSERT_EQUAL_INT(42, secondValue);
|
||||
TEST_ASSERT_EQUAL_INT(42, *secondValue);
|
||||
|
||||
/*if(topValue != NULL && *topValue == 12 && secondValue != NULL && *secondValue == 42)
|
||||
{
|
||||
@ -57,13 +57,13 @@ void testeStackBeschreiben()
|
||||
}*/
|
||||
|
||||
|
||||
printf("=== Ende Test: push() ===\n\n");
|
||||
//printf("=== Ende Test: push() ===\n\n");
|
||||
return;
|
||||
}
|
||||
|
||||
void testepop()
|
||||
{
|
||||
printf("=== Test: pop() ===\n");
|
||||
//printf("=== Test: pop() ===\n");
|
||||
|
||||
StackNode *stack = NULL;
|
||||
int wert1 = 20;
|
||||
@ -77,7 +77,7 @@ void testepop()
|
||||
int *topValue = (int *)(stack->data);
|
||||
|
||||
TEST_ASSERT_NOT_NULL(topValue);
|
||||
TEST_ASSERT_EQUAL_INT(20, topValue);
|
||||
TEST_ASSERT_EQUAL_INT(20, *topValue);
|
||||
|
||||
/*if(topValue != NULL && *topValue == 20)
|
||||
{
|
||||
@ -88,12 +88,12 @@ void testepop()
|
||||
printf("Test 1: FEHLGESCHLAGEN!\n");
|
||||
}*/
|
||||
|
||||
printf("=== Ende Test: pop() ===\n\n");
|
||||
//printf("=== Ende Test: pop() ===\n\n");
|
||||
}
|
||||
|
||||
void testetop()
|
||||
{
|
||||
printf("=== Test: top() ===\n");
|
||||
//printf("=== Test: top() ===\n");
|
||||
|
||||
StackNode *stack = NULL;
|
||||
int wert1 = 20;
|
||||
@ -105,7 +105,7 @@ void testetop()
|
||||
int *topValue = top(stack);
|
||||
|
||||
TEST_ASSERT_NOT_NULL(topValue);
|
||||
TEST_ASSERT_EQUAL_INT(74, topValue);
|
||||
TEST_ASSERT_EQUAL_INT(74, *topValue);
|
||||
|
||||
/*if(topValue != NULL && *topValue == 74)
|
||||
{
|
||||
@ -116,12 +116,12 @@ void testetop()
|
||||
printf("Test: FEHLGESCHLAGEN!\n");
|
||||
}*/
|
||||
|
||||
printf("=== Ende Test: top() ===\n\n");
|
||||
//printf("=== Ende Test: top() ===\n\n");
|
||||
}
|
||||
|
||||
void testeclearStack()
|
||||
{
|
||||
printf("=== Test: clearStack() ===\n");
|
||||
//printf("=== Test: clearStack() ===\n");
|
||||
|
||||
StackNode *stack = NULL;
|
||||
int wert1 = 20;
|
||||
@ -132,8 +132,8 @@ void testeclearStack()
|
||||
|
||||
clearStack(stack);
|
||||
|
||||
printf("Test: clearStack() aufgerufen. Speicher freigegeben.\n");
|
||||
printf("=== Ende Test: clearStack() ===\n\n");
|
||||
//printf("Test: clearStack() aufgerufen. Speicher freigegeben.\n");
|
||||
//printf("=== Ende Test: clearStack() ===\n\n");
|
||||
}
|
||||
|
||||
int main()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user