CCUnit  2.1
A C Unit Testing Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions | Variables
_Line
_ReadSuite

Read one line module. More...

Collaboration diagram for _Line:

Data Structures

struct  _CCUnitLine
 Read line. More...

Functions

static int readline ()
 Get one line from stream.
static char * readDocCommentContents ()
 read contents of doc comment.
static char * readDocComment ()
 read document comment.
static const char * getTestName (CCUnitTestType_t type, const char *str)
 get test def.
static const char * getEndOfTest (CCUnitTestType_t type, const char *str)
 get end of test string.
static _CCUnitFuncDefreadTestFunc (const char *type, const char *prefix, const char *desc)
 read test funcdef.
static void readTestCase (_CCUnitTestSuiteDef *suite, const char *cname)
 read test case function.
static void readSuite (_CCUnitTestSuiteDef *suite)
 read test suite def.

Variables

static struct _CCUnitLine line
 Current processing line.
static const char * testTypeStr []

Detailed Description

Read one line module.


Function Documentation

static const char* getEndOfTest ( CCUnitTestType_t  type,
const char *  str 
)
static

get end of test string.

Parameters:
typetest type.
strstring.
Returns:
name of test.

References ccunit_dbg(), ccunit_log(), ccunitTypeSuite, and testTypeStr.

Referenced by readSuite(), and readTestCase().

Here is the call graph for this function:

Here is the caller graph for this function:

static const char* getTestName ( CCUnitTestType_t  type,
const char *  str 
)
static

get test def.

Parameters:
typetest type.
strcomment string.
Returns:
test name.

References ccunit_dbg(), ccunit_err(), ccunitTypeSuite, line, lno, and testTypeStr.

Referenced by readSuite(), and readTestCase().

Here is the call graph for this function:

Here is the caller graph for this function:

static char* readDocComment ( )
static

read document comment.

Returns:
comment content if matched, or NULL if not matched.

References ccunit_dbg(), line, lno, readDocCommentContents(), and str.

Referenced by readSuite(), and readTestCase().

Here is the call graph for this function:

Here is the caller graph for this function:

static char* readDocCommentContents ( )
static

read contents of doc comment.

Returns:
comment string. or NULL when error occurred.

References ccunit_dbg(), ccunit_err(), ccunit_log(), length, line, lno, readline(), and str.

Referenced by readDocComment().

Here is the call graph for this function:

Here is the caller graph for this function:

static int readline ( )
static

Get one line from stream.

This func copies a read line on the global variable line.

Returns:
When reading succeeds, value except for the zero is returned. When an error occurs, a zero is returned.

References capacity, ccunit_log(), ifp, length, line, lno, and str.

Referenced by readDocCommentContents(), readSuite(), readTestCase(), and readTestFunc().

Here is the call graph for this function:

Here is the caller graph for this function:

static void readSuite ( _CCUnitTestSuiteDef suite)
static

read test suite def.

Parameters:
suitetest suitedef.

References addTestSuiteDef(), ccunit_err(), ccunit_newTestSuiteDef(), ccunitTypeSuite, ccunitTypeTestCase, deleteFuncDef(), fname, getEndOfTest(), getTestName(), line, lno, readDocComment(), readline(), readTestCase(), readTestFunc(), safe_free, and str.

Referenced by ccunit_readSuite(), and readTestCase().

Here is the call graph for this function:

Here is the caller graph for this function:

static void readTestCase ( _CCUnitTestSuiteDef suite,
const char *  cname 
)
static

read test case function.

Parameters:
suiteparent suite.
cnametest case name to read.

References addTestCaseDef(), addTestSuiteDef(), ccunit_addList(), ccunit_err(), ccunit_log(), ccunit_newTestSuiteDef(), ccunitTypeSuite, ccunitTypeTestCase, fname, getEndOfTest(), getTestName(), line, lno, _CCUnitTestDef::name, newTestCaseDef(), readDocComment(), readline(), readSuite(), readTestFunc(), safe_free, _CCUnitTestCaseDef::testdef, and _CCUnitTestCaseDef::testFuncs.

Referenced by readSuite().

Here is the call graph for this function:

Here is the caller graph for this function:

static _CCUnitFuncDef* readTestFunc ( const char *  type,
const char *  prefix,
const char *  desc 
)
static

read test funcdef.

Parameters:
typerequired type string.
prefixrequired func name prefix.
descdescription.
Returns:
funcdef object.

References ccunit_dbg(), ccunit_err(), line, newFuncDef(), readline(), and str.

Referenced by readSuite(), and readTestCase().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

struct _CCUnitLine line
static
const char* testTypeStr[]
static
Initial value:
{
"case", "suite"
}

Referenced by getEndOfTest(), and getTestName().

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