CCUnit  2.1
A C Unit Testing Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Modules | Data Structures | Typedefs | Functions
List
Module Hierarchy

Linked list container. More...

Collaboration diagram for List:

Modules

 ListCell
 Linked list cell.
 ListIterator
 List iterator.

Data Structures

struct  CCUnitList
 list container. More...

Typedefs

typedef struct CCUnitList CCUnitList
 list container.

Functions

CCUnitListccunit_initList (CCUnitList *list)
 Initialize list object.
CCUnitListccunit_newList ()
 Create new list object.
void ccunit_addList (CCUnitList *list, void *contents)
 Add element to list object.
void ccunit_deleteList (CCUnitList *list, void(*deleteContents)(void *))
 Delete list object.
CCUnitListIteratorccunit_initListIterator (const struct CCUnitList *list, struct CCUnitListIterator *it)
 initialize list iterator.
CCUnitListIteratorccunit_newListIterator (const struct CCUnitList *list)
 create new list iterator.
bool ccunit_hasNextListIterator (struct CCUnitListIterator *it)
 Check is there next element of iterator.
void * ccunit_nextListIterator (struct CCUnitListIterator *it)
 Get next element.
void ccunit_deleteListIterator (struct CCUnitListIterator *it)
 delete list iterator.

Detailed Description

Linked list container.


Typedef Documentation

typedef struct CCUnitList CCUnitList

list container.


Function Documentation

void ccunit_addList ( CCUnitList list,
void *  contents 
)

Add element to list object.

Parameters:
listList object.
contentsA pointer to an object to register in the list.

References ccunit_newListCell(), CCUnitListCell::contents, length, CCUnitListCell::next, and tailp.

Referenced by addTestDef(), ccunit_addFailure(), ccunit_addResultListener(), ccunit_addTest(), ccunit_addTestFunc(), and readTestCase().

Here is the call graph for this function:

Here is the caller graph for this function:

void ccunit_deleteList ( CCUnitList list,
void(*)(void *)  deleteContents 
)

Delete list object.

Parameters:
listDeleting list.
deleteContentsA pointer to the function which the object registered in the list is deleted from.

References ccunit_deleteListCell(), CCUnitListCell::contents, head, isAllocated, CCUnitListCell::next, and safe_free.

Referenced by ccunit_deleteTestResult(), destroy(), destroyTestCaseDef(), and destroyTestSuiteDef().

Here is the call graph for this function:

Here is the caller graph for this function:

void ccunit_deleteListIterator ( struct CCUnitListIterator it)
inline

delete list iterator.

Parameters:
ititerator to delete.

References CCUnitListIterator::isAllocated, and safe_free.

Referenced by printFailures().

Here is the caller graph for this function:

bool ccunit_hasNextListIterator ( struct CCUnitListIterator it)

Check is there next element of iterator.

Parameters:
itAn iterator.
Returns:
true if there is next element, or false.

References CCUnitListIterator::current.

Referenced by ccunit_nextListIterator().

Here is the caller graph for this function:

CCUnitList * ccunit_initList ( CCUnitList list)

Initialize list object.

Parameters:
listinitializing list.
Returns:
initialized list.

References head, isAllocated, length, and tailp.

Referenced by ccunit_newList(), ccunit_newTestCase(), ccunit_newTestResult(), ccunit_newTestSuite(), ccunit_newTestSuiteDef(), and newTestCaseDef().

Here is the caller graph for this function:

CCUnitListIterator* ccunit_initListIterator ( const struct CCUnitList list,
struct CCUnitListIterator it 
)
inline

initialize list iterator.

Parameters:
listAn owner list of iterator.
itIterator to initialize.
Returns:
Initialized iterator.

References CCUnitListIterator::current, head, and CCUnitListIterator::isAllocated.

Referenced by _ccunit_endTest(), _ccunit_startTest(), ccunit_addFailure(), ccunit_newListIterator(), printPrototypes(), printSuite(), printTestCase(), and run().

Here is the caller graph for this function:

CCUnitList * ccunit_newList ( )
inline

Create new list object.

Returns:
new list object.

References ccunit_initList(), and isAllocated.

Here is the call graph for this function:

CCUnitListIterator* ccunit_newListIterator ( const struct CCUnitList list)

create new list iterator.

Parameters:
listAn owner list of iterator.
Returns:
New iterator.

References ccunit_initListIterator(), and CCUnitListIterator::isAllocated.

Referenced by ccunit_failures().

Here is the call graph for this function:

Here is the caller graph for this function:

void* ccunit_nextListIterator ( struct CCUnitListIterator it)

Get next element.

Parameters:
itAn Iterator.
Returns:
pointer to next element object.

References ccunit_hasNextListIterator(), CCUnitListCell::contents, CCUnitListIterator::current, and CCUnitListCell::next.

Referenced by _ccunit_endTest(), _ccunit_startTest(), ccunit_addFailure(), printFailures(), printPrototypes(), printSuite(), printTestCase(), and run().

Here is the call graph for this function:

Here is the caller graph for this function:

SourceForge.jp hosts this site. Send comments to: CCUnit Developer