亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cunit.3

?? cunit
?? 3
?? 第 1 頁 / 共 2 頁
字號:
.TH CUnit 3 "August 2004" "CUnit-2.0-1" "CUnit Programmer's Manual"

.SH NAME
CUnit - A unit testing framework for C

.SH SYNOPSIS
.PD 0.4v
.TP 30
.B #include <CUnit/CUnit.h>
ASSERT definitions, test management.
.TP 30
.B #include <CUnit/Automated.h>
Automated interface with xml output.
.TP 30
.B #include <CUnit/Basic.h>
Basic interface with console output.       
.TP 30
.B #include <CUnit/Console.h>
Interactive console interface.
.TP 30
.B #include <CUnit/CUCurses.h>
Interactive curses interface.
.PD 2v

.SH DESCRIPTION
CUnit is a system for writing, administering, and running unit tests in C.
It uses a simple framework for building test structures, and provides a
rich set of assertions for testing common data types.  CUnit is built as
a static library which is linked with the user's testing code.

.SH "STRUCTURE & GENERAL USAGE"
CUnit is a combination of a platform-independent framework with various
user interfaces. The core framework provides basic support for managing
a test registry, suites, and test cases. The user interfaces facilitate
interaction with the framework to run tests and view results.
.P
The basic hierarchichal organization of CUnit is depicted here:
.P
.br
                  Test Registry
                        |
           -----------------------------
           |                           |
        Suite '1'      . . . .      Suite 'N'
           |                           |
     ---------------             ---------------
     |             |             |             |
  Test '11' ... Test '1M'     Test 'N1' ... Test 'NM'
.br
.P
Individual test cases are packaged into suites, which are registered
with the active test registry.  Suites can have setup and teardown
functions which are automatically called before and after running the
suite's tests. All suites/tests in the registry may be run using a
single function call, or selected suites or tests can be run.
.P
The typical usage of CUnit is:
.HP 3
.PD 0.2v
1. Write functions for tests (and suite init/cleanup if necessary).
.HP 3
2. Initialize the test registry using
.B CU_initialize_registry()
.HP 3
3. Add test suites to the registry using
.B CU_add_suite()
.HP 3
4. Add test cases to the suites using
.B CU_add_test()
.TP 3
5. Run tests using the desired interface, e.g.
.B CU_console_run_tests()
to use the interactive console.
.HP 3
6. Cleanup the test registry using
.B CU_cleanup_registry()
.PD 2v
.P
All public names in CUnit are prefixed with 'CU_'.  This helps
minimize clashes with names in user code.  Note that earlier versions
CUnit used different names without this prefix.  The older API names
are deprecated but still supported.  To use the older names, user code
must now be compiled with
.B USE_DEPRECATED_CUNIT_NAMES
defined.

.SH "WRITING TEST FUNCTIONS"
A "test" is a C function having the signature:
.B "void test_func(void)."
There are no restrictions on the content of a test function, except
that it should not modify the CUnit framework (e.g. add suites or tests,
modify the test registry, or initiate a test run).  A test function may
call other functions (which also may not modify the framework).
Registering a test will cause it's function to be run when the
test is run.
.P
CUnit provides a set of assertions for testing logical conditions.  The
success or failure of these assertions is tracked by the framework,
and can be viewed when a test run is complete.  Each assertion tests a
single logical condition, and fails if the condition evaluates to CU_FALSE.
Upon failure, the test continues unless the user chooses the 'xxx_FATAL'
version of an assertion.  In that case, the test function returns
immediately.

CUnit provides a set of assertions for testing logical conditions.  The
success or failure of these assertions is tracked by the framework,
and can be viewed when a test run is complete.
.P
Each assertion tests a single logical condition, and fails if the
condition evaluates to CU_FALSE.  Upon failure, the test function 
continues unless the user chooses the 'xxx_FATAL' version of an 
assertion.  In that case, the test function is aborted and returns 
immediately.
.B "FATAL versions of assertions should be used with caution!"
There is no opportunity for the test function to clean up after 
itself once a FATAL assertion fails.  The normal suite cleanup 
function is not affected, however.
.P
There are also special "assertions" for registering a pass or fail with
the framework without performing a logical test.  These are useful for 
testing flow of control or other conditions not requiring a logical test.
.P
Other functions called by a registered test function may use the CUnit
assertions freely.  These assertions will be counted for the calling
function.  They may also use FATAL versions of assertions - failure
will abort the original test function and its entire call chain.
.P
The assertions defined by CUnit are:
.P
.B #include <CUnit/CUnit.h>

.P
.B CU_ASSERT(int expression)
.br
.B CU_ASSERT_FATAL(int expression)
.br
.B CU_TEST(int expression)
.br
.B CU_TEST_FATAL(int expression)
.RS 5
Assert that expression is CU_TRUE (non-zero).
.RE

.P
.B CU_ASSERT_TRUE(value)
.br
.B CU_ASSERT_TRUE_FATAL(value)
.RS 5
Assert that value is CU_TRUE (non-zero).
.RE

.P
.B CU_ASSERT_FALSE(value)
.br
.B CU_ASSERT_FALSE_FATAL(value)
.RS 5
Assert that value is CU_FALSE (zero).
.RE

.P
.B CU_ASSERT_EQUAL(actual, expected)
.br
.B CU_ASSERT_EQUAL_FATAL(actual, expected)
.RS 5
Assert that actual == expected.
.RE

.P
.B CU_ASSERT_NOT_EQUAL(actual, expected)
.br
.B CU_ASSERT_NOT_EQUAL_FATAL(actual, expected)
.RS 5
Assert that actual != expected.
.RE

.P
.B CU_ASSERT_PTR_EQUAL(actual, expected)
.br
.B CU_ASSERT_PTR_EQUAL_FATAL(actual, expected)
.RS 5
Assert that pointers actual == expected.
.RE

.P
.B CU_ASSERT_PTR_NOT_EQUAL(actual, expected)
.br
.B CU_ASSERT_PTR_NOT_EQUAL_FATAL(actual, expected)
.RS 5
Assert that pointers actual != expected.
.RE

.P
.B CU_ASSERT_PTR_NULL(value)
.br
.B CU_ASSERT_PTR_NULL_FATAL(value)
.RS 5
Assert that pointer value == NULL.
.RE

.P
.B CU_ASSERT_PTR_NOT_NULL(value)
.br
.B CU_ASSERT_PTR_NOT_NULL_FATAL(value)
.RS 5
Assert that pointer value != NULL.
.RE

.P
.B CU_ASSERT_STRING_EQUAL(actual, expected)
.br
.B CU_ASSERT_STRING_EQUAL_FATAL(actual, expected)
.RS 5
Assert that strings actual and expected are equivalent.
.RE

.P
.B CU_ASSERT_STRING_NOT_EQUAL(actual, expected)
.br
.B CU_ASSERT_STRING_NOT_EQUAL_FATAL(actual, expected)
.RS 5
Assert that strings actual and expected differ.
.RE

.P
.B CU_ASSERT_NSTRING_EQUAL(actual, expected, count)
.br
.B CU_ASSERT_NSTRING_EQUAL_FATAL(actual, expected, count)
.RS 5
Assert that 1st count chars of actual and expected are the same.
.RE

.P
.B CU_ASSERT_NSTRING_NOT_EQUAL(actual, expected, count)
.br
.B CU_ASSERT_NSTRING_NOT_EQUAL_FATAL(actual, expected, count)
.RS 5
Assert that 1st count chars of actual and expected differ.
.RE

.P
.B CU_ASSERT_DOUBLE_EQUAL(actual, expected, granularity)
.br
.B CU_ASSERT_DOUBLE_EQUAL_FATAL(actual, expected, granularity)
.RS 5
Assert that |actual - expected| <= |granularity|.
.br
Math library must be linked in for this assertion.
.RE

.P
.B CU_ASSERT_DOUBLE_NOT_EQUAL(actual, expected, granularity)
.br
.B CU_ASSERT_DOUBLE_NOT_EQUAL_FATAL(actual, expected, granularity)
.RS 5
Assert that |actual - expected| > |granularity|.
.br
Math library must be linked in for this assertion.
.RE

.P
.B CU_PASS(message)
.RS 5
Register a success without performing a logical test.
.RE

.P
.B CU_FAIL(message)
.br
.B CU_FAIL_FATAL(message)
.RS 5
Register a failure without performing a logical test.
.RE

.SH "THE TEST REGISTRY"
The test registry is the repository for suites and associated tests.
The user normally only needs to initialize the registry before use and
clean up afterwards.  However, other functions are provided to
manipulate the registry when necessary.
.P
The main functions needed by clients are:
.P
.B #include <CUnit/TestDB.h>
(included automatically by <CUnit/CUnit.h>)
.TP 5
.B "CU_ErrorCode CU_initialize_registry(void)"
Initializes the framework.  This function should be called before any
other CUnit functions.  Failure to do so will likely result in a crash.
An error status code is returned:
.RS 5
.TP 15
CUE_SUCCESS
if initialization is successful.
.TP 15
CUE_NOMEMORY
if memory allocation failed.
.RE

.TP 5
.B "CU_BOOL CU_registry_initialized(void)"
Checks whether the framework has been initialized.  This may be useful if
the registry setup is distributed over multiple files that need to make
sure the registry is ready for test registration.

.TP 5
.B "void CU_cleanup_registry(void)"
Cleans up and releases memory used by the framework.  No CUnit functions
(other than
.B CU_initialize_registry()
) should be called after this function.  Failure to call
.B CU_cleanup_registry()
will result in memory leaks.  Note also that this function will destroy
all suites (and associated tests) in the registry.
.P
Other registry functions are primarily for internal and testing purposes.
However, general users may find use for them and should be aware of them.
These include:
.TP 5
.B "CU_pTestRegistry CU_get_registry(void)"
Retrieve a pointer to the active test registry.  The registry is a
variable of data type CU_Testregistry (declared in <CUnit/TestDB.h>).
Note that the returned pointer will be invalidated by a call to
.B CU_cleanup_registry()
or
.B CU_initialize_registry()
\.

.TP 5
.B "CU_pTestRegistry CU_set_registry(CU_pTestRegistry pTestRegistry)"
Replace the active registry with the specified one.  A pointer to the
previous registry is returned.
.B "It is the caller's responsibility to destroy the old registry."
This can be accomplished using
.B CU_destroy_existing_registry()
on the returned pointer.  Alternatively, the old registry can be
set as the active one.  A subsequent call to
.B CU_cleanup_registry()
will then destroy it automatically.  Care should be taken not to
explicitly destroy a registry that is set as the active one.  This
will result in multiple frees of the same memory and a likely crash.
.TP 5
.B "CU_pTestRegistry CU_create_new_registry(void)"
Create a new registry and return a pointer to it.  The new registry
will not contain any suites or tests.  It is the caller's
responsibility to destroy the new registry by one of the mechanisms
described previously.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99精品在线观看视频| 欧美精品一区二区三| 欧美色倩网站大全免费| 欧美成人a视频| 一区二区三区日本| 国产成人欧美日韩在线电影| 精品视频一区 二区 三区| 国产欧美视频一区二区| 蜜臀久久99精品久久久久久9| 91亚洲资源网| 国产精品久久久久久久久快鸭 | 亚洲狼人国产精品| 国内精品不卡在线| 91麻豆精品国产91久久久久| 亚洲日穴在线视频| 国产高清不卡二三区| 日韩精品在线一区二区| 午夜私人影院久久久久| 本田岬高潮一区二区三区| 久久综合久久综合亚洲| 日韩国产精品大片| 欧美日韩你懂得| 亚洲成人av一区二区三区| 91福利在线播放| 一区二区三区日本| 欧美在线三级电影| 亚洲国产综合91精品麻豆| 91精品办公室少妇高潮对白| 亚洲猫色日本管| 色香蕉久久蜜桃| 一区二区三区免费网站| 91九色最新地址| 亚洲二区在线观看| 欧美日韩大陆在线| 美脚の诱脚舐め脚责91| 日韩欧美一区中文| 精品在线免费视频| 久久精品水蜜桃av综合天堂| 国产精品99久久久久久宅男| 国产亚洲欧美一级| 99久久综合99久久综合网站| 中文字幕视频一区| 欧美色图一区二区三区| 午夜久久久影院| 欧美一区二区三区视频| 久久精品国产免费看久久精品| 精品久久国产97色综合| 国产精品一区二区在线观看不卡| 欧美国产乱子伦 | 国产激情精品久久久第一区二区 | 26uuu久久综合| 国产成人自拍高清视频在线免费播放| 国产亚洲欧美日韩俺去了| 成人美女视频在线观看18| 亚洲综合丝袜美腿| 日韩一级免费观看| 高清av一区二区| 亚洲一区在线电影| 日韩天堂在线观看| 99r国产精品| 免费成人美女在线观看.| 国产喷白浆一区二区三区| 91美女片黄在线观看| 蜜桃视频一区二区三区在线观看| 久久久久久久综合色一本| 91污在线观看| 毛片av中文字幕一区二区| 亚洲国产高清在线观看视频| 欧美日韩三级一区二区| 激情综合网最新| 亚洲精品国产品国语在线app| 欧美肥妇free| 成人免费视频视频在线观看免费 | 亚洲精品欧美专区| 日韩免费视频一区| 91麻豆国产在线观看| 精品无码三级在线观看视频| 亚洲精品视频在线| 久久理论电影网| 欧美午夜免费电影| av一区二区不卡| 久久99九九99精品| 亚洲国产综合人成综合网站| 国产精品欧美一区喷水| 欧美一区二区视频在线观看2022| 99精品视频在线观看| 韩国三级电影一区二区| 五月天婷婷综合| 亚洲精品一卡二卡| 欧美国产日韩精品免费观看| 日韩色在线观看| 精品视频123区在线观看| 99精品视频在线观看| 国产精品2024| 国产一区二区剧情av在线| 香蕉av福利精品导航| 曰韩精品一区二区| 亚洲欧洲日产国产综合网| 久久久久久久久久久99999| 日韩欧美国产一二三区| 欧美精品少妇一区二区三区| 一本色道久久综合亚洲91| 懂色av一区二区三区免费看| 久久99精品国产| 免费精品视频最新在线| 五月激情综合色| 亚洲高清不卡在线| 亚洲国产成人高清精品| 亚洲精品中文字幕在线观看| 亚洲日本电影在线| 亚洲欧洲一区二区在线播放| 亚洲国产精品99久久久久久久久 | 一区二区三区国产精品| 国产精品萝li| 日本一区二区成人| 欧美国产乱子伦| 国产欧美精品一区aⅴ影院 | 日本在线不卡视频一二三区| 亚洲电影第三页| 亚洲主播在线播放| 亚洲一区二区在线观看视频 | 国产日韩欧美精品一区| 国产午夜三级一区二区三| 精品国产污污免费网站入口 | 亚洲同性gay激情无套| 亚洲成av人片在线观看无码| 一区二区三区四区视频精品免费| 国产精品久久久久aaaa樱花| 1000部国产精品成人观看| 国产精品久久久久久久久晋中| 欧美极品xxx| 亚洲乱码国产乱码精品精小说| 18欧美亚洲精品| 亚洲成人一区二区在线观看| 亚洲大片免费看| 图片区小说区国产精品视频| 日本亚洲一区二区| 久久国产人妖系列| 国产精品一二三| 99re热视频这里只精品| 欧美日韩一区二区三区在线看| 欧美欧美午夜aⅴ在线观看| 91精品国产麻豆| 久久久亚洲精品石原莉奈| 国产精品理论片| 亚洲第一搞黄网站| 国产真实乱子伦精品视频| 99视频精品免费视频| 精品污污网站免费看| 精品久久久久一区二区国产| 久久久久高清精品| 亚洲成人午夜影院| 国产乱子伦视频一区二区三区| 不卡av在线免费观看| 欧美日本在线视频| 国产欧美一区二区精品婷婷| 亚洲精品中文在线观看| 日本欧美韩国一区三区| 成人免费的视频| 6080yy午夜一二三区久久| 亚洲成人动漫av| av中文字幕在线不卡| 欧美福利视频一区| 国产三级欧美三级日产三级99| 亚洲一区二区三区四区五区中文| 精品一区二区三区视频在线观看| av中文字幕不卡| 日韩欧美在线一区二区三区| 一区二区三区毛片| 国产成人av影院| 69堂国产成人免费视频| 欧美国产日韩亚洲一区| 免费成人在线视频观看| 色菇凉天天综合网| 中文字幕成人av| 蜜臀av国产精品久久久久| 在线视频欧美精品| 国产视频一区二区在线| 卡一卡二国产精品| 欧美日韩视频一区二区| 成人免费在线视频观看| 国产一区二区三区久久久| 91精品国产色综合久久ai换脸 | 精品成人一区二区三区| 亚洲高清免费观看| 日本高清不卡视频| 亚洲欧洲精品一区二区三区不卡| 极品瑜伽女神91| 欧美精品久久久久久久久老牛影院| 自拍偷拍亚洲激情| 大白屁股一区二区视频| 久久综合九色综合久久久精品综合| 亚洲一卡二卡三卡四卡无卡久久| 99久久综合国产精品| 欧美国产激情一区二区三区蜜月| 国内精品自线一区二区三区视频| 日韩一区二区三区电影在线观看| 亚洲国产精品久久久男人的天堂| 色综合av在线| 亚洲综合精品久久|