[ CCUnit project page ] |  | [ CCUnit home page ]

Modules | Functions

# MakeSuite
[Module hierarchy]

To generate a code to create test suite code from the test case source codes, the test case source codes must be formatted by following pseudo-BNF: More...

Collaboration diagram for MakeSuite:

## 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
static void | usage (const char *progname)
| print help massage.

## Detailed Description

To generate a code to create test suite code from the test case source codes, the test case source codes must be formatted by following pseudo-BNF:

     SOURCEFILE ::= [SUITE]... | FIXTURE...

     SUITE ::= SUITE_HEADER
               [ any-C-code ]...
               FIXTURE...
               SUITE_END

     SUITE_HEADER ::= JAVADOC_COMMENT_BEGIN 'test suite:' SUITE_NAME COMMENT_END
     SUITE_END ::= JAVADOC_COMMENT_BEGIN 'end test suite' wsp string COMMENT_END

     FIXTURE ::= FIXTURE_HEADER
                 [FIXTURE_CODE]...
                 [SETUP_SETUP_FUNC]
                 [SETUP_TEARDOWN_FUNC]
                 [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_SETUP_FUNC ::= [ FUNC_DESC ]
                            ['static'] 'void setup_setUp'[A-Za-z0-9_]* '()'
                            FUNC_BODY

     SETUP_TEARDOWN_FUNC ::= [ FUNC_DESC ]
                               ['static'] 'void setup_tearDown'[A-Za-z0-9_]* '()'
                               FUNC_BODY

     SETUP_FUNC ::= [ FUNC_DESC ]
                      ['static'] 'void setUp'[A-Za-z0-9_]* '()'
                      FUNC_BODY

     TEARDOWN_FUNC ::= [ FUNC_DESC ]
                         ['static'] 'void tearDown'[A-Za-z0-9_]* '()'
                         FUNC_BODY

     TESTCASE ::= [ FUNC_DESC ] 'void test'[A-Za-z0-9_]* '()' FUNC_BODY

     FIXTURE_END ::= JAVADOC_COMMENT_BEGIN 'end test case' wsp string COMMENT_END

     FUNC_DESC ::= JAVADOC_COMMENT_BEGIN string COMMENT_END

     FUNC_BODY ::= '{' C language codes... '}'

     JAVADOC_COMMENT_BEGIN ::= '/' '*' '*'
     COMMENT_END ::= '*' '/'

## Function Documentation

static void usage | ( | const char * | progname | ) | `[static]`

print help massage.

Parameters:

  | progname | program name.

References LONGOPTNAME.

| hosts this site. |  | Send comments to: CCUnit Developer |