CCUnit project page CCUnit home page

Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

MakeSuite
[Module hierarchy]


Detailed Description

Generate a code to creating test suite code from the test case source codes.

The following are pseudo-BNF of requiring test case source:

 SOURCEFILE ::= FIXTURE...
 FIXTURE ::= FIXTURE_HEADER [FIXTURE_CODE]... [SETUP_FUNC] [TEARDOWN_FUNC]
             [TESTCASE]... FIXTURE_END
 FIXTURE_HEADER ::= JAVADOC_COMMENT_BEGIN
                    'test case:' TESTFIXTURE_NAME
                    COMMENT_END
 FIXTURE_CODE ::= any C language codes.
 SETUP_FUNC ::= [ FUNC_DESC ] 'void setUp'[A-Za-z0-9_]* '()' FUNC_BODY
 FUNC_DESC ::= JAVADOC_COMMENT_BEGIN string COMMENT_END
 FUNC_BODY ::= '{' C language codes... '}'
 TEARDOWN_FUNC ::= [ FUNC_DESC ] 'void tearDown'[A-Za-z0-9_]* '()' FUNC_BODY
 TESTCASE ::= [ FUNC_DESC ] 'void test'[A-Za-z0-9_]* '()' FUNC_BODY
 FUXTURE_END ::= JAVADOC_COMMENT_BEGIN 'end test case' wsp string COMMENT_END
 JAVADOC_COMMENT_BEGIN ::= '/' '*' '*'
 COMMENT_END ::= '*' '/'


Modules

_TestDef
 Test definition.

_TestSuiteDef
 Test suite definition.

_TestCaseDef
 Test case definition.

_TestFixtureDef
 Test fixture definition.

_ReadSuite
 Read test case definitions from test source code.

_WriteSuite
 Write the source code to making the test suite.

_PrintSuite
Creating test suite tool ccunit_makeSuite
 Generate a source code to creating test suite.


Functions

void usage (const char *progname)
 print help massage.

int ccunit_makeSuite (int ac, char **av)
 Generate a code to creating test suite code from the test case source codes.

int ccunit_va_makeSuite (const char *prg,...)
 Generate a code to creating test suite code from the test case source codes.


Function Documentation

int ccunit_makeSuite int  ac,
char **  av
 

Generate a code to creating test suite code from the test case source codes.

The following are pseudo-BNF of requiring test case source:

 SOURCEFILE ::= FIXTURE...
 FIXTURE ::= FIXTURE_HEADER [FIXTURE_CODE]... [SETUP_FUNC] [TEARDOWN_FUNC]
             [TESTCASE]... FIXTURE_END
 FIXTURE_HEADER ::= JAVADOC_COMMENT_BEGIN
                    'test case:' TESTFIXTURE_NAME
                    COMMENT_END
 FIXTURE_CODE ::= any C language codes.
 SETUP_FUNC ::= [ FUNC_DESC ] 'void setUp'[A-Za-z0-9_]* '()' FUNC_BODY
 FUNC_DESC ::= JAVADOC_COMMENT_BEGIN string COMMENT_END
 FUNC_BODY ::= '{' C language codes... '}'
 TEARDOWN_FUNC ::= [ FUNC_DESC ] 'void tearDown'[A-Za-z0-9_]* '()' FUNC_BODY
 TESTCASE ::= [ FUNC_DESC ] 'void test'[A-Za-z0-9_]* '()' FUNC_BODY
 FUXTURE_END ::= JAVADOC_COMMENT_BEGIN 'end test case' wsp string COMMENT_END
 JAVADOC_COMMENT_BEGIN ::= '/' '*' '*'
 COMMENT_END ::= '*' '/'

Parameters:
ac arg count.
av array of arg string.
 av[] = { PRORGNAME, [OPTIONS]..., FILES... }
 OPTIONS:
      --output OUTFILE
      -o OUTFILE
          output file name (default stdout)
      --function FUNCTION
      -f FUNCTION
          creating function name
      --verbose
      -v
          output verbose message
      --debug
      -d
          output debug message
      --version
      -V
          print version
      --help
      -h
          print this message

Returns:
0 if succeeded, else error occured.

int ccunit_va_makeSuite const char *  prg,
... 
 

Generate a code to creating test suite code from the test case source codes.

Parameters:
prg program name
... arguments. The last arg must be NULL.
Returns:
0 if succeeded, else error occured.
See also:
ccunit_makeSuite

void usage const char *  progname  )  [static]
 

print help massage.

Parameters:
progname program name.

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