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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? testrun.c

?? CUNIT
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* *  CUnit - A Unit testing framework library for C. *  Copyright (C) 2001  Anil Kumar *  Copyright (C) 2004  Anil Kumar, Jerry St.Clair * *  This library is free software; you can redistribute it and/or *  modify it under the terms of the GNU Library General Public *  License as published by the Free Software Foundation; either *  version 2 of the License, or (at your option) any later version. * *  This library is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU *  Library General Public License for more details. * *  You should have received a copy of the GNU Library General Public *  License along with this library; if not, write to the Free Software *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA *//* *  Contains the Console Test Interface  implementation. * *  Created By     : Anil Kumar on ...(in month of Aug 2001) *  Last Modified  : 19/Aug/2001 *  Comment        : Added initial registry/Suite/test framework implementation. *  Email          : aksaharan@yahoo.com * *  Last Modified  : 24/Aug/2001 by Anil Kumar *  Comment        : Changed Data structure from SLL to DLL for all linked lists. *  Email          : aksaharan@yahoo.com * *  Last Modified  : 25/Nov/2001 by Anil Kumar *  Comment        : Added failure notification for Suite Initialization failure condition. *  Email          : aksaharan@yahoo.com * *  Last Modified  : 5-Aug-2004 (JDS) *  Comment        : New interface, doxygen comments, moved add_failure on suite *                   initialization so called even if a callback is not registered, *                   moved CU_assertImplementation into TestRun.c, consolidated *                   all run summary info out of CU_TestRegistry into TestRun.c, *                   revised counting and reporting of run stats to cleanly *                   differentiate suite, test, and assertion failures. *  Email          : jds2@users.sourceforge.net * *  Last Modified  : 1-Sep-2004 (JDS) *  Comment        : Modified CU_assertImplementation() and run_single_test() for *                   setjmp/longjmp mechanism of aborting test runs, add asserts in *                   CU_assertImplementation() to trap use outside a registered *                   test function during an active test run. *  Email          : jds2@users.sourceforge.net * *  Last Modified  : 22-Sep-2004 (JDS) *  Comment        : Initial implementation of internal unit tests, added nFailureRecords *                   to CU_Run_Summary, added CU_get_n_failure_records(), removed *                   requirement for registry to be initialized in order to run *                   CU_run_suite() and CU_run_test(). *  Email          : jds2@users.sourceforge.net *//** @file *  Test run management functions (implementation). *//** @addtogroup Framework @{*/#include <stdlib.h>#include <string.h>#include <assert.h>#include <stdio.h>#include <setjmp.h>#include "CUnit.h"#include "MyMem.h"#include "TestDB.h"#include "TestRun.h"static BOOL       f_bTestIsRunning = FALSE; /**< Flag for whether a test run is in progress */static CU_pSuite  f_pCurSuite = NULL;       /**< Pointer to the suite currently being run. */static CU_pTest   f_pCurTest  = NULL;       /**< Pointer to the test currently being run. *//** CU_RunSummary to hold results of each test run. */static CU_RunSummary f_run_summary = {0, 0, 0, 0, 0, 0, 0};/** CU_pFailureRecord to hold head of failure record list of each test run. */static CU_pFailureRecord f_failure_list = NULL;/** Keeps track of end of f_run_summary list for message handlers. */static CU_pFailureRecord f_last_failure = NULL;/* Forward declarations of static functions. */static void         clear_previous_results(CU_pRunSummary pRunSummary, CU_pFailureRecord* ppFailure);static void         cleanup_failure_list(CU_pFailureRecord* ppFailure);static CU_ErrorCode run_single_suite(CU_pSuite pSuite, CU_pRunSummary pRunSummary);static CU_ErrorCode run_single_test(CU_pTest pTest, CU_pRunSummary pRunSummary);static void         add_failure(CU_pFailureRecord* ppFailure, CU_pRunSummary pRunSummary,                                unsigned int uiLineNumber, char szCondition[],                                char szFileName[], CU_pSuite pSuite, CU_pTest pTest);/** Pointer to the function to be called before running a test. */static CU_TestStartMessageHandler        f_pTestStartMessageHandler = NULL;/** Pointer to the function to be called after running a test. */static CU_TestCompleteMessageHandler     f_pTestCompleteMessageHandler = NULL;/** Pointer to the function to be called when all tests have been run. */static CU_AllTestsCompleteMessageHandler f_pAllTestsCompleteMessageHandler = NULL;/** Pointer to the function to be called if a suite initialization function returns an error. */static CU_SuiteInitFailureMessageHandler f_pSuiteInitFailureMessageHandler = NULL;/*------------------------------------------------------------------------*//** Assertion implementation function. * All CUnit assertions reduce to a call to this function. * It should only be called during an active test run (checked * by assertion).  This means that CUnit assertions should only * be used in registered test functions during a test run. * @param bValue        Value of the assertion (TRUE or FALSE). * @param uiLine        Line number of failed test statement. * @param strCondition  String containing logical test that failed. * @param strFile       Source file where test statement failed. * @param strFunction   Function where test statement failed. * @param bFatal        TRUE to abort test (via longjmp()), FALSE to continue test. * @return As a convenience, returns the value of the assertion. */BOOL CU_assertImplementation(BOOL bValue, unsigned int uiLine,                             char strCondition[], char strFile[],                             char strFunction[], BOOL bFatal){  /* not used in current implementation - stop compiler warning */  (void)strFunction;  /* these should always be non-NULL (i.e. a test run is in progress) */  assert(f_pCurSuite);  assert(f_pCurTest);  ++f_run_summary.nAsserts;  if (!bValue) {    ++f_run_summary.nAssertsFailed;    add_failure(&f_failure_list, &f_run_summary,                uiLine, strCondition, strFile, f_pCurSuite, f_pCurTest);    if (bFatal && f_pCurTest->pJumpBuf)      longjmp(*(f_pCurTest->pJumpBuf), 1);  }  return bValue;}/* * Get/Set functions for Message Handlers. *//*------------------------------------------------------------------------*//** Set the message handler to call before each test is run. */void CU_set_test_start_handler(CU_TestStartMessageHandler pTestStartHandler){  f_pTestStartMessageHandler = pTestStartHandler;}/*------------------------------------------------------------------------*//** Set the message handler to call after each test is run. */void CU_set_test_complete_handler(CU_TestCompleteMessageHandler pTestCompleteHandler){  f_pTestCompleteMessageHandler = pTestCompleteHandler;}/*------------------------------------------------------------------------*//** Set the message handler to call after all tests have been run. */void CU_set_all_test_complete_handler(CU_AllTestsCompleteMessageHandler pAllTestsCompleteHandler){  f_pAllTestsCompleteMessageHandler = pAllTestsCompleteHandler;}/*------------------------------------------------------------------------*//** Set the message handler to call when a suite * initialization function returns an error. */void CU_set_suite_init_failure_handler(CU_SuiteInitFailureMessageHandler pSuiteInitFailureHandler){  f_pSuiteInitFailureMessageHandler = pSuiteInitFailureHandler;}/*------------------------------------------------------------------------*//** Retrieve the message handler called before each test is run. */CU_TestStartMessageHandler CU_get_test_start_handler(void){  return f_pTestStartMessageHandler;}/*------------------------------------------------------------------------*//** Retrieve the message handler called after each test is run. */CU_TestCompleteMessageHandler CU_get_test_complete_handler(void){  return f_pTestCompleteMessageHandler;}/*------------------------------------------------------------------------*//** Retrieve the message handler called after all tests are run. */CU_AllTestsCompleteMessageHandler CU_get_all_test_complete_handler(void){  return f_pAllTestsCompleteMessageHandler;}/*------------------------------------------------------------------------*//** Retrieve the message handler called when a suite * initialization error occurs. */CU_SuiteInitFailureMessageHandler CU_get_suite_init_failure_handler(void){  return f_pSuiteInitFailureMessageHandler;}/* * Functions to get the Run statistics for the Test Run. *//*------------------------------------------------------------------------*//** Retrieve the number of suites completed during the previous run. * The count is reset each time the client initiates a run. * @see CU_get_number_of_tests_run() */unsigned int CU_get_number_of_suites_run(void){  return f_run_summary.nSuitesRun;}/*------------------------------------------------------------------------*//** Retrieve the number of suites which failed to initialize * during the previous run. * The count is reset each time the client initiates a run. * @see CU_get_number_of_tests_run() */unsigned int CU_get_number_of_suites_failed(void){  return f_run_summary.nSuitesFailed;}/*------------------------------------------------------------------------*//** Retrieve the number of tests completed during the previous run. * The count is reset each time the client initiates a run. * @see CU_get_number_of_suites_run() */unsigned int CU_get_number_of_tests_run(void){  return f_run_summary.nTestsRun;}/*------------------------------------------------------------------------*//** Retrieve the number of tests which contained failed * assertions during the previous run. * The count is reset each time the client initiates a run. * @see CU_get_number_of_suites_run() */unsigned int CU_get_number_of_tests_failed(void){  return f_run_summary.nTestsFailed;}/*------------------------------------------------------------------------*//** Retrieve the number of assertions processed during the last run. * The count is reset each time the client initiates a run. * @see CU_get_number_of_successes() * @see CU_get_number_of_failures() */unsigned int CU_get_number_of_asserts(void){  return f_run_summary.nAsserts;}/*------------------------------------------------------------------------*//** Retrieve the number of successful assertions during the last run. * The count is reset each time the client initiates a run. * @see CU_get_number_of_failures() */unsigned int CU_get_number_of_successes(void){  return (f_run_summary.nAsserts - f_run_summary.nAssertsFailed);}/*------------------------------------------------------------------------*//** Retrieve the number of failed assertions during the last run. * The count is reset each time the client initiates a run. * @see CU_get_number_of_successes() */unsigned int CU_get_number_of_failures(void){  return f_run_summary.nAssertsFailed;}/*------------------------------------------------------------------------*//** Retrieve the number failure records created during  * the previous run.  Note that this may be more than the * number of failed assertions, since failure records may also * be created for failed suite initialization and cleanup. * The count is reset each time the client initiates a run. */unsigned int CU_get_number_of_failure_records(void){  return f_run_summary.nFailureRecords;}/*------------------------------------------------------------------------*//** Retrieve the list of failures which occurred during * the last test run.  Note that the pointer returned * is invalidated when the client initiates a run using * CU_run_all_tests(), CU_run_suite(), or CU_run_test(). * @see CU_get_number_of_successes() */const CU_pFailureRecord CU_get_failure_list(void){  return f_failure_list;}/*------------------------------------------------------------------------*//** Retrieve the entire run summary for the last test run. * Note that the pFailure pointer in the run summary is * invalidated when the client initiates a run using * CU_run_all_tests(), CU_run_suite(), or CU_run_test(). * @see CU_get_number_of_successes() */const CU_pRunSummary CU_get_run_summary(void){  return &f_run_summary;}/* * Functions for running suites and tests. *//*------------------------------------------------------------------------*//** Run all tests in all suites registered in the test registry. * The suites are run in the order registered in the test registry. * For each registered suite, any initialization function is first * called, the suite is run using run_single_suite(), and finally * any  suite cleanup function is called.  If an error condition * (other than CUE_NOREGISTRY) occurs during the run, the action * depends on the current error action (see CU_set_error_action()). * @return A CU_ErrorCode indicating the first error condition *         encountered while running the tests. * @see CU_run_suite() to run the tests in a specific suite. * @see CU_run_test() for run a specific test only. */CU_ErrorCode CU_run_all_tests(void){  CU_pTestRegistry pRegistry = CU_get_registry();  CU_pSuite pSuite = NULL;  CU_ErrorCode result;  CU_ErrorCode result2;  CU_set_error(result = CUE_SUCCESS);  if (!pRegistry) {    CU_set_error(result = CUE_NOREGISTRY);  }  else {    /* test run is starting - set flag */    f_bTestIsRunning = TRUE;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲激情图片qvod| 99视频精品全部免费在线| 一区二区三区在线观看欧美| 国产精品免费视频观看| 亚洲国产高清在线| 国产精品美女久久久久久2018| 久久久美女毛片| 国产日韩精品视频一区| 国产欧美日韩精品一区| 中文字幕一区在线观看视频| 成人免费在线播放视频| 亚洲激情av在线| 亚洲黄色小视频| 亚洲午夜精品久久久久久久久| 亚洲福利国产精品| 毛片一区二区三区| 国产乱子伦视频一区二区三区| 国产精品99久久久久久久女警| 国产99久久久国产精品免费看 | 欧美色成人综合| 欧美日韩性生活| 91精品婷婷国产综合久久竹菊| 5566中文字幕一区二区电影| 91精品国产高清一区二区三区 | 日韩av在线发布| 韩国中文字幕2020精品| 国产精品69久久久久水密桃| 91蝌蚪porny| 欧美日韩国产区一| 日韩精品一区二区三区swag| 欧美国产日韩a欧美在线观看 | 99精品久久99久久久久| 欧美视频一区二区| 精品国产精品一区二区夜夜嗨| 国产欧美视频一区二区三区| 亚洲精品国产精华液| 日本成人在线不卡视频| 国产成人在线视频网址| 欧美在线你懂得| 日韩精品一区二| 日韩一区欧美一区| 日本不卡123| 粉嫩嫩av羞羞动漫久久久| 欧美影院精品一区| 久久久噜噜噜久噜久久综合| 一区二区三区高清不卡| 看电视剧不卡顿的网站| 91在线高清观看| 日韩欧美资源站| ●精品国产综合乱码久久久久| 日韩精品1区2区3区| 成人精品免费视频| 日韩午夜激情免费电影| 亚洲婷婷在线视频| 国产在线视频精品一区| 欧美色图12p| 国产欧美日韩另类视频免费观看| 午夜久久久久久久久久一区二区| 国产精品 日产精品 欧美精品| 欧美日韩激情一区二区| 国产日韩欧美精品在线| 日韩电影在线观看电影| 色欧美乱欧美15图片| 久久久99精品免费观看| 亚洲地区一二三色| 99久久精品久久久久久清纯| 日韩一级完整毛片| 一区二区成人在线视频| 成人短视频下载| 精品对白一区国产伦| 性做久久久久久久免费看| 99视频热这里只有精品免费| 久久久一区二区三区捆绑**| 日韩国产精品91| 欧美综合一区二区三区| 中文一区二区完整视频在线观看 | 欧美婷婷六月丁香综合色| 欧美激情综合在线| 久久不见久久见免费视频1| 欧美视频在线观看一区二区| 国产精品久久久久久久第一福利| 蜜臀av一级做a爰片久久| 欧美日韩在线直播| 亚洲黄色小视频| 97久久超碰国产精品电影| 国产亚洲精品福利| 国产在线日韩欧美| 久久综合九色综合97婷婷| 日本sm残虐另类| 欧美另类一区二区三区| 亚洲一二三四在线观看| 91麻豆swag| 亚洲视频在线观看一区| 成人精品在线视频观看| 中文一区二区在线观看| 成人性生交大片免费看中文| 久久久一区二区三区捆绑**| 国产一区二区三区观看| 久久综合九色综合97婷婷女人| 久久精品99久久久| 精品国产一区久久| 精品亚洲欧美一区| 久久久影视传媒| 国产精品一二三四| 国产农村妇女精品| 成人国产精品免费网站| 国产精品白丝在线| 91偷拍与自偷拍精品| 亚洲三级在线看| 色成年激情久久综合| 亚洲免费在线观看视频| 91免费在线看| 亚瑟在线精品视频| 日韩欧美色综合| 国产又粗又猛又爽又黄91精品| 久久久91精品国产一区二区精品| 国产精品一区一区| 中文字幕一区二区三区四区不卡| aa级大片欧美| 亚洲自拍欧美精品| 欧美日韩精品是欧美日韩精品| 日本最新不卡在线| 精品国产一区二区国模嫣然| 风间由美一区二区av101| 国产精品久久久久久亚洲伦 | 中文字幕av一区二区三区免费看| 不卡的av电影在线观看| 一区二区三区在线播放| 欧美视频在线一区| 精品一区二区三区视频在线观看| 久久精品欧美一区二区三区不卡| 成人午夜视频免费看| 亚洲免费观看高清| 日韩一区二区三区电影在线观看 | 91在线视频免费观看| 亚洲国产精品久久人人爱| 日韩午夜在线影院| 成人91在线观看| 五月天国产精品| 国产视频亚洲色图| 欧美少妇性性性| 国产精品中文欧美| 亚洲自拍偷拍欧美| 久久久美女艺术照精彩视频福利播放| 99久久精品免费精品国产| 日本系列欧美系列| 国产精品热久久久久夜色精品三区| 欧美视频一区二区三区在线观看| 精品一区二区在线免费观看| 亚洲欧洲成人精品av97| 91麻豆精品91久久久久久清纯| 国产成人无遮挡在线视频| 亚洲综合激情另类小说区| 久久午夜色播影院免费高清| 在线视频国内自拍亚洲视频| 黄网站免费久久| 亚洲一区在线视频观看| 26uuu国产在线精品一区二区| 91亚洲精品久久久蜜桃| 免费不卡在线观看| 亚洲欧美日韩国产综合| 欧美成人伊人久久综合网| 91美女在线观看| 国产精品一区二区免费不卡 | 91麻豆免费观看| 精品一区二区三区免费观看| 亚洲乱码日产精品bd| 2023国产精华国产精品| 欧美日韩在线免费视频| 大陆成人av片| 蜜桃免费网站一区二区三区| 亚洲欧美激情视频在线观看一区二区三区 | 欧美在线综合视频| 国产高清不卡二三区| 日本欧美在线观看| 亚洲精品大片www| 国产精品久久久久aaaa| 久久综合丝袜日本网| 8v天堂国产在线一区二区| 91在线观看美女| www.日韩精品| 国产精品1区2区| 久久99精品久久久| 天天综合色天天| 亚洲男同1069视频| 中文字幕视频一区| 国产欧美视频在线观看| 久久影音资源网| 精品国产一区二区三区久久影院| 欧美日韩美少妇| 欧美日韩亚洲国产综合| 91成人网在线| 色综合夜色一区| 91免费看`日韩一区二区| 国产成人午夜99999| 国产经典欧美精品| 国产精品夜夜爽| 国产一区二区三区av电影| 麻豆成人免费电影| 男女激情视频一区|