-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_size.c
executable file
·77 lines (62 loc) · 2.1 KB
/
test_size.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/**
* @brief Test harness for single linked list size operations
* @file test_size.c
*/
/*
******************************************************************************
Includes
******************************************************************************
*/
#include <stdio.h>
#include <stdlib.h>
#include "list.h"
/*
******************************************************************************
Private Constants
******************************************************************************
*/
/*
******************************************************************************
Private Types
******************************************************************************
*/
/*
******************************************************************************
Private variables (static)
******************************************************************************
*/
/*
******************************************************************************
Private Macros
******************************************************************************
*/
/*
******************************************************************************
Global variables
******************************************************************************
*/
/*
******************************************************************************
Exported Global variables
******************************************************************************
*/
/*
******************************************************************************
Prototypes of all functions contained in this file (in order of occurance)
******************************************************************************
*/
int test_size ( void )
{
// Sign on
printf("**** Linked List Test - size\n");
/*
* create a new list
*/
list_t *SizeTest;
SizeTest = list_create();
printf("\tTest01 - size on empty list %d \n",list_size(SizeTest));
list_add_element(SizeTest,100);
printf("\tTest02 - size on list 1 = %d\n",list_size(SizeTest));
printf("**** Linked ListTest - size Ends\n");
return 0;
}