いくつかのテストケースやテストスイートをまとめて、 ひとつのテストスイートにします。
[詳細]
説明
いくつかのテストケースやテストスイートをまとめて、 ひとつのテストスイートにします。
- 参照:
- MakeSuite
型定義
A Composite
class of Tests.
It runs a collection of test case or suite. Here is an example.
- 参照:
- CCUnitTest, CCUnitTestCase.
関数
Adds a test to the suite.
- 引数:
-
| suite | test suite. |
| test | test to add. |
Adds a test case to the suite.
- 引数:
-
| suite | test suite. |
| testCase | test case to add. |
Adds a test suite to the suite.
- 引数:
-
| suite | test suite. |
| testSuite | test to add. |
Destructs test suite.
- 引数:
-
int ccunit_makeSuite |
( |
int |
ac, |
|
|
char ** |
av | |
|
) |
| | |
テストケースのソースコードから、テストスイートを作成するコードを生成する。
- 引数:
-
| 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
FILES: the special name '-' means input from stdin.
テストケースソースコードは次の疑似 BNF によってフォーマットされなくてはなりません。
SOURCEFILE ::= [SUITE]... | TESTCASE...
SUITE ::= SUITE_HEADER
[ any-C-code ]...
TESTCASE...
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
TESTCASE ::= TESTCASE_HEADER
[TESTCASE_CODE]...
[TESTFUNC]...
TESTCASE_END
TESTCASE_HEADER ::= JAVADOC_COMMENT_BEGIN
'test case:' TESTCASE_NAME
COMMENT_END
TESTCASE_CODE ::= any C language codes.
TESTFUNC ::= [ FUNC_DESC ] 'void ' FUNC_PREFIX[A-Za-z0-9_]* '()' FUNC_BODY
FUNC_PREFIX ::= 'test' | 'setUp' | 'tearDown' | 'setup_setUp' | 'setup_tearDown'
TESTCASE_END ::= JAVADOC_COMMENT_BEGIN 'end test case ' [string] COMMENT_END
FUNC_DESC ::= JAVADOC_COMMENT_BEGIN string COMMENT_END
FUNC_BODY ::= '{' C language codes... '}'
JAVADOC_COMMENT_BEGIN ::= '/' '*' '*'
COMMENT_END ::= '*' '/'
- 戻り値:
- 0 if succeeded, else error occured.
参照元 main().
Constructs an empty TestSuite.
- 引数:
-
- 戻り値:
- new test suite.
Create a test suite from test source file.
- 引数:
-
- 戻り値:
- new test suite.
int ccunit_va_makeSuite |
( |
const char * |
prg, |
|
|
|
... | |
|
) |
| | |
Generate a code to creating test suite code from the test func source codes.
- 引数:
-
| prg | program name |
| ... | arguments. The last arg must be NULL. |
- 戻り値:
- 0 if succeeded, else error occured.
- 参照:
- ccunit_makeSuite
int main |
( |
int |
ac, |
|
|
char ** |
av | |
|
) |
| | |