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

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

?? managing_tests.html

?? 關于c單元測試的一些文檔
?? HTML
字號:
<HTML><HEAD>  <TITLE>CUnit - Managing Tests & Suites</TITLE>  <LINK REL=StyleSheet HREF="CUnit_doc.css" TYPE="text/css" TITLE="CUnit Basic Style" /></HEAD><BODY><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0">  <TR>    <TH COLSPAN="3" ALIGN="center"><H3>CUnit Progammers Guide</H3></TH>  </TR>  <TR>    <TD WIDTH="10%" ALIGN="left" VALIGN="bottom"><A HREF="test_registry.html" ACCESSKEY="P" >Prev</A></TD>    <TD WIDTH="80%" ALIGN="center" VALIGN="bottom"><A HREF="index.html" ACCESSKEY="H" >Home</A></TD>    <TD WIDTH="10%" ALIGN="right" VALIGN="bottom"><A HREF="running_tests.html" ACCESSKEY="N" >Next</A></TD>  </TR></TABLE><HR ALIGN="LEFT" WIDTH="100%"><H2>4. Managing Tests & Suites</H2>In order for a test to be run by CUnit, it must be added to a testcollection (suite) which is registered with the <A HREF="test_registry.html">test registry</A>.<H3 ID="synopsis">4.1. Synopsis</H3>#include &lt;<A HREF="headers/TestDB.h">CUnit/TestDB.h</A>&gt;(included automatically by &lt;<A HREF="headers/CUnit.h">CUnit/CUnit.h</A>&gt;)<P /><PRE>  typedef struct <B CLASS="cite">CU_Suite</B>  typedef CU_Suite*  <B CLASS="cite">CU_pSuite</B>  typedef struct <B CLASS="cite">CU_Test</B>  typedef CU_Test*  <B CLASS="cite">CU_pTest</B>  typedef void (*<B CLASS="cite">CU_TestFunc</B>)(void)  typedef int  (*<B CLASS="cite">CU_InitializeFunc</B>)(void)  typedef int  (*<B CLASS="cite">CU_CleanupFunc</B>)(void)  CU_pSuite <A HREF="#addsuite">CU_add_suite</A>(const char* strName,                         CU_InitializeFunc pInit,                         CU_CleanupFunc pClean);  CU_pTest  <A HREF="#addtest">CU_add_test</A>(CU_pSuite pSuite,                        const char* strName,                        CU_TestFunc pTestFunc);  typedef struct <B CLASS="cite">CU_TestInfo</B>  typedef struct <B CLASS="cite">CU_SuiteInfo</B>  CU_ErrorCode <A HREF="#regsuites">CU_register_suites</A>(CU_SuiteInfo suite_info[]);  CU_ErrorCode <A HREF="#regsuites">CU_register_nsuites</A>(int suite_count, ...);</PRE><H3 ID="addsuite">4.2. Adding Suites to the Registry</H3><P CLASS="indent2"><CITE>CU_pSuite <B>CU_add_suite</B>(const char* strName, CU_InitializeFunc pInit, CU_CleanupFunc pClean)</CITE></P><P CLASS="indent5">Creates a new test collection (suite) havingthe specified name, initialization function, and cleanup function.The new suite is registered with (and owned by) the<A HREF="test_registry.html">test registry</A>, so the registry must be<A HREF="test_registry.html#init">initialized</A> before adding any suites.The current implementation does not support the creation ofsuites independent of the test registry.<BR /><BR />The suite's name must be unique among all suites in the registry.  Theinitialization and cleanup functions are optional, and are passed as pointers to functions to be called before and after running the tests contained in the suite.  This allows the suite to set up and tear down temporary fixtures to support running the tests.  These functions take no arguments and should return zero if they are completed successfully (non-zero otherwise).  If a suite does not require one or both of these functions, pass <CODE>NULL</CODE> to <CITE>CU_add_suite()</CITE>.<BR /><BR />A pointer to the new suite is returned, which is needed for addingtests to the suite.  If an error occurs, <CODE>NULL</CODE> is returned and theframework <A HREF="error_handling.html">error code</A> is set to oneof the following:</P><P CLASS="indent10"><TABLE CELLPADDING=1>  <TR>    <TD><CITE>CUE_SUCCESS</CITE></TD>    <TD>suite creation was successful.</TD>  </TR>  <TR>    <TD><CITE>CUE_NOREGISTRY</CITE></TD>    <TD>the registry has not been initialized.</TD>  </TR>  <TR>    <TD><CITE>CUE_NO_SUITENAME</CITE></TD>    <TD>strName was <CODE>NULL</CODE>.</TD>  </TR>  <TR>    <TD><CITE>CUE_DUP_SUITE</CITE></TD>    <TD>the suite's name was not unique.</TD>  </TR>  <TR>    <TD><CITE>CUE_NOMEMORY</CITE></TD>    <TD>memory allocation failed.</TD>  </TR></TABLE></P><H3 ID="addtest">4.3. Adding Tests to Suites</H3><P CLASS="indent2"><CITE>CU_pTest <B>CU_add_test</B>(CU_pSuite pSuite, const char* strName, CU_TestFunc pTestFunc)</CITE></P><P CLASS="indent5">Creates a new test having the specified name andtest function, and registers it with the specified suite.  The suitemust already have been created using <A HREF="#addsuite">CU_add_suite()</A>.The current implementation does not support the creation of testsindependent of a registered suite.<BR /><BR />The test's name must be unique among all tests added to a single suite.The test function cannot be <CODE>NULL</CODE>, and points to a functionto be called when the test is run. Test functions have neither arguments nor return values.<BR /><BR />A pointer to the new test is returned.  If an error occurs duringcreation of the test, <CODE>NULL</CODE> is returned and the framework<A HREF="error_handling.html">error code</A> is set to one of thefollowing:</P><P CLASS="indent10"><TABLE CELLPADDING=1>  <TR>    <TD><CITE>CUE_SUCCESS</CITE></TD>    <TD>suite creation was successful.</TD>  </TR>  <TR>    <TD><CITE>CUE_NOSUITE</CITE></TD>    <TD>the specified suite was <CODE>NULL</CODE> or invalid.</TD>  </TR>  <TR>    <TD><CITE>CUE_NO_TESTNAME</CITE></TD>    <TD>strName was <CODE>NULL</CODE>.</TD>  </TR>  <TR>    <TD><CITE>CUE_NO_TEST</CITE></TD>    <TD>pTestFunc was <CODE>NULL</CODE> or invalid.</TD>  </TR>  <TR>    <TD><CITE>CUE_DUP_TEST</CITE></TD>    <TD>the test's name was not unique.</TD>  </TR>  <TR>    <TD><CITE>CUE_NOMEMORY</CITE></TD>    <TD>memory allocation failed.</TD>  </TR></TABLE></P><H3 ID="shortcuts">4.4. Shortcut Methods for Managing Tests</H3><P CLASS="indent2"><CITE>#define <B>CU_ADD_TEST</B>(suite, test) (CU_add_test(suite, #test, (CU_TestFunc)test))</CITE></P><P CLASS="indent5">This macro automatically generates a unique test namebased on the test function name, and adds it to the specified suite.  The return value should be checked by the user to verify success.</P><P CLASS="indent2" ID="regsuites"><CITE>CU_ErrorCode <B>CU_register_suites</B>(CU_SuiteInfo suite_info[])</CITE><BR /><CITE>CU_ErrorCode <B>CU_register_nsuites</B>(int suite_count, ...)</CITE></P><P CLASS="indent5">For large test structures with many tests and suites,managing test/suite associations and registration is tedious and error-prone.CUnit provides a special registration system to help manage suites and tests.It's primary benefit is to centralize the registration of suites and associatedtests, and to minimize the amount of error checking code the user needs to write.<BR /><BR />Test cases are first grouped into arrays of <CITE>CU_TestInfo</CITE> instances(defined in &lt;<A HREF="headers/TestDB.h">CUnit/TestDB.h</A>&gt;):</P><PRE CLASS="indent10">CU_TestInfo test_array1[] = {  { "testname1", test_func1 },  { "testname2", test_func2 },  { "testname3", test_func3 },  CU_TEST_INFO_NULL,};</PRE><P CLASS="indent5">Each array element contains the (unique) name and testfunction for a single test case.  The array must end with an elementholding <CODE>NULL</CODE> values, which the macro <CITE>CU_TEST_INFO_NULL</CITE>conveniently defines.  The test cases included in a single<CITE>CU_TestInfo</CITE> array form the set of tests that will be registeredwith a single test suite.<BR /><BR />Suite information is then defined in one or more arrays of <CITE>CU_SuiteInfo</CITE> instances (defined in &lt;<A HREF="headers/TestDB.h">CUnit/TestDB.h</A>&gt;):</P><PRE CLASS="indent10">CU_SuiteInfo suites[] = {  { "suitename1", suite1_init-func, suite1_cleanup_func, test_array1 },  { "suitename2", suite2_init-func, suite2_cleanup_func, test_array2 },  CU_SUITE_INFO_NULL,};</PRE><P CLASS="indent5">Each of these array elements contain the (unique) name,suite initialization function, suite cleanup function, and<CITE>CU_TestInfo</CITE> array for a single suite.  As usual,<CODE>NULL</CODE> may be used for the initialization or cleanupfunction if the given suite does not need it. The array must endwith an all-<CODE>NULL</CODE> element, for which the macro<CITE>CU_SUITE_INFO_NULL</CITE> may be used.<BR /><BR />All suites defined in a <CITE>CU_SuiteInfo</CITE> array can then beregistered in a single statement:</P><P CLASS="indent10"><CITE>CU_ErrorCode</CITE> error = <CITE>CU_register_suites</CITE>(suites);</P><P CLASS="indent5">If an error occurs during the registration of any suite ortest, an error code is returned.  The error codes are the same as those returnedby normal <A HREF="#addsuite">suite registration</A> and<A HREF="#addtest">test addition</A> operations.  The function<CITE>CU_register_nsuites()</CITE> is provided for situations in whichthe user wishes to register multiple <CITE>CU_SuiteInfo</CITE> arraysin a single statement:</P><P CLASS="indent10"><CITE>CU_ErrorCode</CITE> error = <CITE>CU_register_nsuites</CITE>(2, suites1, suites2);</P><P CLASS="indent5">This function accepts a variable number of <CITE>CU_SuiteInfo</CITE> arrays.The first argument indicates the actual number ot arrays being passed.</P><H3 ID="deprecated">4.5. Deprecated v1 Data Types & Functions</H3>The following data types and functions are deprecated as of version 2.To use these deprecated names, user code must be compiled with<CITE>USE_DEPRECATED_CUNIT_NAMES</CITE> defined.<P /><B>#include&nbsp;&lt;<A HREF="headers/TestDB.h">CUnit/TestDB.h</A>&gt;</B>(included automatically by <A HREF="headers/CUnit.h">CUnit/CUnit.h</A>&gt;).<P /><TABLE CELLPADDING=5 BORDER=2>  <TR VALIGN="top">    <TD><B>Deprecated Name</B></TD>    <TD><B>Equivalent New Name</B></TD>  </TR>  <TR VALIGN="top">    <TD><CODE>TestFunc</CODE></TD>    <TD><A HREF="#synopsis">CU_TestFunc</A></TD>  </TR>  <TR VALIGN="top">    <TD><CODE>InitializeFunc</CODE></TD>    <TD><A HREF="#synopsis">CU_InitializeFunc</A></TD>  </TR>  <TR VALIGN="top">    <TD><CODE>CleanupFunc</CODE></TD>    <TD><A HREF="#synopsis">CU_CleanupFunc</A></TD>  </TR>  <TR VALIGN="top">    <TD><CODE>_TestCase</CODE></TD>    <TD><A HREF="#synopsis">CU_Test</A></TD>  </TR>  <TR VALIGN="top">    <TD><CODE>PTestCase</CODE></TD>    <TD><A HREF="#synopsis">CU_pTest</A></TD>  </TR>  <TR VALIGN="top">    <TD><CODE>_TestGroup</CODE></TD>    <TD><A HREF="#synopsis">CU_Suite</A></TD>  </TR>  <TR VALIGN="top">    <TD><CODE>PTestGroup</CODE></TD>    <TD><A HREF="#synopsis">CU_pSuite</A></TD>  </TR>  <TR VALIGN="top">    <TD><CODE>add_test_group()</CODE></TD>    <TD><A HREF="#addsuite">CU_add_suite()</A></TD>  </TR>  <TR VALIGN="top">    <TD><CODE>add_test_case()</CODE></TD>    <TD><A HREF="#addtest">CU_add_test()</A></TD>  </TR>  <TR VALIGN="top">    <TD><CODE>ADD_TEST_TO_GROUP()</CODE></TD>    <TD><A HREF="#shortcuts">CU_ADD_TEST()</A></TD>  </TR>  <TR VALIGN="top">    <TD><CODE>test_case_t</CODE></TD>    <TD><A HREF="#regsuites">CU_TestInfo</A></TD>  </TR>  <TR VALIGN="top">    <TD><CODE>test_group_t</CODE></TD>    <TD><A HREF="#regsuites">CU_SuiteInfo</A></TD>  </TR>  <TR VALIGN="top">    <TD><CODE>test_suite_t</CODE></TD>    <TD>no equivalent - use <A HREF="#regsuites">CU_SuiteInfo</A></TD>  </TR>  <TR VALIGN="top">    <TD><CODE>TEST_CASE_NULL</CODE></TD>    <TD><A HREF="#regsuites">CU_TEST_INFO_NULL</A></TD>  </TR>  <TR VALIGN="top">    <TD><CODE>TEST_GROUP_NULL</CODE></TD>    <TD><A HREF="#regsuites">CU_SUITE_INFO_NULL</A></TD>  </TR>  <TR VALIGN="top">    <TD><CODE>test_group_register</CODE></TD>    <TD><A HREF="#regsuites">CU_register_suites()</A></TD>  </TR>  <TR VALIGN="top">    <TD><CODE>test_suite_register</CODE></TD>    <TD>no equivalent - use <A HREF="#regsuites">CU_register_suites()</A></TD>  </TR></TABLE><DIV CLASS="NAVFOOTER"><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0">  <TR>    <TD WIDTH="33%" ALIGN="left" VALIGN="top"><A HREF="test_registry.html" ACCESSKEY="P">Prev</A></TD>    <TD WIDTH="34%" ALIGN="center" VALIGN="top"><A HREF="index.html" ACCESSKEY="H" >Home</A></TD>    <TD WIDTH="33%" ALIGN="right" VALIGN="top"><A HREF="running_tests.html" ACCESSKEY="N" >Next</A></TD>  </TR>  <TR>    <TD WIDTH="33%" ALIGN="left" VALIGN="top">The Test Registry</TD>    <TD WIDTH="34%" ALIGN="center" VALIGN="top">&nbsp;</TD>    <TD WIDTH="33%" ALIGN="right" VALIGN="top">Running Tests</TD>  </TR></TABLE></DIV></BODY></HTML>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区伦理片| 欧美日本在线播放| 欧美日韩高清一区| 久久久不卡网国产精品一区| 亚洲精品乱码久久久久久| 韩国视频一区二区| 欧美在线观看你懂的| 国产日韩三级在线| 日本va欧美va精品发布| 在线精品视频一区二区| 国产人久久人人人人爽| 蜜桃久久久久久| 欧美三区在线观看| 中文字幕一区二区三区不卡在线| 麻豆精品一区二区| 欧美日韩国产高清一区二区三区| 日韩美女视频19| 国产99精品国产| 久久免费看少妇高潮| 日本成人在线看| 欧美日韩电影一区| 亚洲综合色网站| 色婷婷亚洲综合| 国产精品国产三级国产专播品爱网| 国内精品在线播放| 精品国产1区2区3区| 日本不卡一区二区| 制服丝袜国产精品| 五月激情六月综合| 欧美日韩性生活| 日韩福利视频网| 日韩欧美一区在线| 蜜臀av在线播放一区二区三区| 717成人午夜免费福利电影| 亚洲一本大道在线| 欧美裸体bbwbbwbbw| 丝袜美腿亚洲综合| 日韩亚洲欧美成人一区| 理论片日本一区| 久久久精品tv| 国产91精品一区二区麻豆亚洲| 国产亚洲欧美日韩俺去了| 成人晚上爱看视频| 亚洲视频一区在线观看| 色综合久久综合| 亚洲va欧美va国产va天堂影院| 制服丝袜激情欧洲亚洲| 九一九一国产精品| 国产校园另类小说区| 成人精品鲁一区一区二区| 国产精品丝袜一区| 欧美综合视频在线观看| 五月综合激情网| 欧美一级二级三级乱码| 久久国产婷婷国产香蕉| 国产欧美一区二区精品性色超碰| 成人免费看黄yyy456| 亚洲乱码国产乱码精品精小说| 在线视频一区二区三| 日本免费在线视频不卡一不卡二| 欧美成人午夜电影| 99精品桃花视频在线观看| 亚洲一区二区三区四区在线观看 | 成人午夜精品在线| 亚洲激情成人在线| 精品国产麻豆免费人成网站| 成人免费看的视频| 视频一区二区中文字幕| 国产区在线观看成人精品| 在线观看日韩精品| 国产在线播放一区二区三区| 亚洲精品美腿丝袜| 精品日韩欧美在线| 在线观看网站黄不卡| 久草这里只有精品视频| 亚洲精品乱码久久久久久| 日韩欧美国产午夜精品| 色综合天天综合在线视频| 青青草伊人久久| 国产精品免费免费| 日韩亚洲电影在线| 91成人免费电影| 国产成人精品一区二区三区四区 | 亚洲精品欧美二区三区中文字幕| 欧美精品久久99| 成人黄页在线观看| 韩国一区二区视频| 日韩av午夜在线观看| 亚洲天堂久久久久久久| 久久久久久久久免费| 69av一区二区三区| 91视频在线看| 国产精品一区二区x88av| 青青草一区二区三区| 亚洲制服欧美中文字幕中文字幕| 久久久久久久精| 日韩午夜三级在线| 欧美三级电影网| 成人黄色a**站在线观看| 精品一区二区三区视频| 亚洲不卡在线观看| 亚洲福利视频一区| 一区二区三区中文在线| 国产精品视频第一区| 久久久精品影视| 精品国产一区二区三区不卡 | 日韩精品成人一区二区三区| 樱桃国产成人精品视频| 亚洲天堂中文字幕| 亚洲四区在线观看| 欧美经典三级视频一区二区三区| 精品免费一区二区三区| 亚洲精品在线三区| www一区二区| 久久精品网站免费观看| 久久欧美一区二区| 中文字幕 久热精品 视频在线| 久久久久99精品一区| 久久久久久9999| 欧美激情一区三区| 国产精品免费aⅴ片在线观看| 日本一区二区三区在线不卡| 国产欧美日韩在线观看| 国产精品久久福利| 亚洲人成伊人成综合网小说| 日韩理论在线观看| 亚洲第一福利一区| 蜜臀99久久精品久久久久久软件| 经典三级在线一区| 国产丶欧美丶日本不卡视频| 成人午夜免费视频| 日本福利一区二区| 欧美日韩一区二区在线观看| 欧美日本高清视频在线观看| 91精品久久久久久蜜臀| 精品国产成人在线影院| 国产精品理论在线观看| 亚洲免费观看高清完整版在线观看 | 欧美高清性hdvideosex| 日韩三级视频中文字幕| 精品国产一区二区精华| 国产精品视频麻豆| 亚洲国产美女搞黄色| 免费人成网站在线观看欧美高清| 久久精品久久精品| 成人国产视频在线观看| 欧美系列日韩一区| 久久你懂得1024| 亚洲另类春色国产| 精品一区二区综合| 欧美日韩在线观看一区二区| 欧美变态凌虐bdsm| 日韩理论电影院| 久热成人在线视频| 91麻豆免费观看| 欧美mv日韩mv国产网站| 亚洲欧洲三级电影| 秋霞av亚洲一区二区三| 97国产精品videossex| 91精品国产色综合久久ai换脸| 久久―日本道色综合久久| 亚洲人成网站在线| 精品一二三四区| 色偷偷88欧美精品久久久| 久久婷婷综合激情| 午夜精品123| 91视频免费看| 精品成人佐山爱一区二区| 一区二区三区在线观看网站| 国产米奇在线777精品观看| 欧美色图天堂网| 中文字幕免费不卡在线| 麻豆国产精品视频| 精品污污网站免费看| 国产日韩亚洲欧美综合| 美女精品一区二区| 欧美体内she精高潮| 中文字幕乱码亚洲精品一区| 精品一区二区三区免费观看| 在线精品亚洲一区二区不卡| 国产精品三级电影| 国产一区二区中文字幕| 日韩一区二区免费高清| 夜夜嗨av一区二区三区四季av| 成人深夜视频在线观看| 国产亚洲成aⅴ人片在线观看| 免费看黄色91| 欧美一区二区三区在线| 亚洲国产日日夜夜| 在线免费观看视频一区| 亚洲免费在线看| 99精品桃花视频在线观看| 中文字幕一区二区三区不卡| 国产传媒一区在线| 国产无一区二区| 高清不卡一区二区| 国产精品电影一区二区三区| 成人av电影在线网| 1区2区3区欧美| 91蜜桃视频在线|